Chapter 5 C Routines Reference
Create a shared variable with a specified name or retrieve the handle for the existing variable with the specified name.
JagStatus JagNewSharedData (
JagDataCollection * pCollection,
SQLPOINTER name,
JagBoolean * pExists,
JagSharedData ** ppProp)
pCollection
The handle of the collection in which you want to create the shared variable.
name
The name of the shared variable.
ppProp
The shared variable handle.
pExists
The address of a JagBoolean status variable. *pExists is set to one of the following values:
Return value |
To indicate |
---|---|
JAG_TRUE |
If a shared variable with the specified name already exists |
JAG_FALSE |
If a shared variable with the specified name is created |
Return value |
To indicate |
---|---|
JAG_SUCCEED |
Success |
JAG_FAIL |
Failure |
Check the server's log file for more information when JagNewSharedData fails.
The JagNewSharedData creates a shared variable with the specified name or returns a reference to the existing shared variable. Newly created variables are initialized to NULL and a refefence to the new variable is returned.
Shared variables are either named or indexed. Named variables are created with JagNewSharedData and retrieved with JagGetSharedData. Indexed variables are created with JagNewSharedDataByIndex and retrieved with JagGetSharedDataByIndex.
Named shared variables are uniquely identifed by the collection which contains them (see JagGetCollection) and the name assigned when the property is created with JagNewSharedData.
See "Share Data Between C Components" in the Jaguar CTS Programmer's Guide for more information.
JagFreeSharedDataHandle, JagGetSharedData, JagGetSharedDataByIndex, JagGetSharedValue, JagNewSharedDataByIndex, JagSetSharedValue
Copyright © 2000 Sybase, Inc. All rights reserved. |
![]() |