Important: The information in this document is obsolete and should not be used for new development.
DBGetSessionNum
TheDBGetSessionNum
function returns a session number when you specify the session ID.
FUNCTION DBGetSessionNum (sessID: LongInt; VAR sessNum: Integer; asyncPB: DBAsyncParmBlkPtr): OSErr;
sessID
- The session ID that was returned by the
DBInit
function.sessNum
- Returns the session number of the session you specify with the
sessID
parameter. The session number is unique for a particular database extension, but the same session number might be in use for different database extensions at the same time.asyncPB
- A pointer to an asynchronous parameter block. If you do not want to call the function asynchronously, set this parameter to
NIL
.DESCRIPTION
You can use theDBGetSessionNum
function to determine the session numbers for the sessions opened by your own application. You might want this information, for example, so you can distinguish your own sessions from those opened by other applications when you use theDBGetConnInfo
function to get information about all open sessions.SPECIAL CONSIDERATIONS
TheDBGetSessionNum
function may move or purge memory. You should not call this routine from within an interrupt, such as in a completion routine or a VBL task.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theDBGetSessionNum
function are
Trap macro Selector _DBGetSessionNum $0605 RESULT CODES
noErr 0 No error rcDBBadSessID -806 Session ID is invalid rcDBAsyncNotSupp -809 The database extension does not support asynchronous calls rcDBPackNotInited -813 The InitDBPack
function has not yet been calledSEE ALSO
A description of the asynchronous parameter block structure begins on page 12-56. TheDBInit
function description begins on page 12-69. A description of theDBGetConnInfo
function begins on page 12-72.