dbgetuserdata

Returns a pointer to user-allocated data from a DBPROCESS structure.

Syntax

LPVOID dbgetuserdata ( PDBPROCESS dbproc );

Arguments
dbproc
Is the DBPROCESS structure that is the handle for a particular workstation/ Microsoft® SQL Server™ process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.
Returns

A generic BYTE pointer to the user’s private data space. This pointer must have been previously saved with the dbsetuserdata function.

Remarks

The functions dbgetuserdata and dbsetuserdata allow the application to associate user data with a particular DBPROCESS, without using global variables. One use for these functions is to handle deadlock. (For an example, see the example under dbsetuserdata. That example reruns the transaction when the application’s message handler detects deadlock.)

You can call dbgetuserdata when dbdead returns TRUE.

This function is particularly useful when the application has more than one DBPROCESS.

See Also
dbsetuserdata  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.