Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Interapplication Communication /
Chapter 12 - Data Access Manager / Data Access Manager Reference
Data Access Manager Routines / Low-Level Interface: Sending and Executing Queries


DBGetErr

The DBGetErr function retrieves error codes and error messages from a data server. You can use this function to obtain information when a low-level function returns the result code rcDBError.

FUNCTION DBGetErr (sessID: LongInt; VAR err1: LongInt;
                   VAR err2: LongInt; VAR item1: Str255;
                   VAR item2: Str255; VAR errorMsg: Str255;
                   asyncPB: DBAsyncParmBlkPtr): OSErr;
sessID
The session ID that was returned by the DBInit function.
err1
Returns the primary error code.
err2
Returns the secondary error code.
item1
Returns a string that describes the object of the error message.
item2
Returns a string that describes the object of the error message.
errorMsg
Returns the error message.
asyncPB
A pointer to an asynchronous parameter block. If you do not want to call the function asynchronously, set this parameter to NIL.
DESCRIPTION
If the DBState function returns the rcDBError result code, indicating that execution of a query ended in an error, the error information retuned by DBGetErr can help you debug the query. The meaning of each error code and error message returned by this function depends on the data server with which you are communicating; see the documentation for that data server for more information.

SPECIAL CONSIDERATIONS
The DBGetErr 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 the DBGetErr function are
Trap macroSelector
_DBGetErr$0E0A

RESULT CODES
noErr0No error
rcDBError-802Error retrieving error information
rcDBBadSessID-806Session ID is invalid
rcDBAsyncNotSupp-809The database extension does not support asynchronous calls
rcDBPackNotInited-813The InitDBPack function has not yet been called
SEE ALSO
For a description of the asynchronous parameter block, see page 12-56.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996