Chapter 5 C Routines Reference


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.

Return Values

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 "Share Data Between C Components" in the Jaguar CTS Programmer's Guide for more information.

See Also

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

 


Copyright © 2000 Sybase, Inc. All rights reserved.