JagGetSharedValue

Description

Retrieve a shared variable value.

Syntax

JagStatus JagGetSharedData (
            JagSharedData * pData,
            SQLPOINTER buf,
            SQLINTEGER buflen,
            SQLINTEGER * outlen)

Parameters

pData

The shared variable handle.

buf

The buffer to which the shared variable value is to be copied.

buflen

The length, in bytes, of the buffer addressed by buf.

outlen

The address of a SQLINTEGER variable. On output, contains the length of the copied value. If no value has been set for the property, the length will be zero.

Returns

Return value

To indicate

JAG_SUCCEED

Success, even if there was no value to copy

JAG_FAIL

Failure

JagGetSharedValue fails if the size of the value is too large for the buffer.

Check the server’s log file for more information when JagGetSharedValue fails.

Usage

You must create the buffer before you retrieve the shared variable value. Make sure the buffer is large enough to hold any value that can be stored in the shared variable.

See Appendix C, “Creating C Components,” in the EAServer Programmer’s Guide for more information.

See also

JagGetSharedData, JagGetSharedDataByIndex, JagLockCollection, JagLockNoWaitCollection, JagNewSharedData, JagNewSharedDataByIndex, JagSetSharedValue, JagUnlockCollection