Saves a pointer to private data space in a SRV_PROC structure.
Important This Open Data Services function or macro is only supported in Microsoft® SQL Server™ version 7.0 for backward compatibility.
For more information about Open Data Services functions or macros supported for backward compatibility, see Open Data Services (Level 3).
int srv_setuserdata (
SRV_PROC * srvproc,
void * ptr );
SUCCEED or FAIL.
The ODS Library passes the current SRV_PROC structure to most event handlers. A pointer to user data can be saved in the SRV_PROC structure by using srv_setuserdata. This pointer to user data allows Open Data Services server applications access private data without using global or static variables to hold private data. Open Data Services applications can then be reentrant.
The ptr pointer is not manipulated in any way by the ODS Library. It is provided only for the convenience of Open Data Services developers. The data that ptr points to can be allocated at connect time and accessed later by using srv_getuserdata.
srv_getuserdata |