Important: The information in this document is obsolete and should not be used for new development.
DBExec
TheDBExecfunction initiates execution of a query that you have sent to a data server.
FUNCTION DBExec (sessID: LongInt; asyncPB: DBAsyncParmBlkPtr): OSErr;
sessID- The session ID that was returned by the
DBInitfunction.asyncPB- A pointer to an asynchronous parameter block. If you do not want to call the function asynchronously, set this parameter to
NIL.DESCRIPTION
TheDBExecfunction initiates execution of a query that you have sent to a data server. You can use theDBStatefunction to determine the status of a query after you have initiated execution.SPECIAL CONSIDERATIONS
TheDBExecfunction 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 theDBExecfunction are
Trap macro Selector _DBExec $0408 RESULT CODES
noErr 0 No error rcDBError -802 Error trying to begin execution rcDBBadSessID -806 Session ID is invalid rcDBAsyncNotSupp -809 The database extension does not support asynchronous calls rcDBPackNotInited -813 The InitDBPackfunction has not yet been calledSEE ALSO
For a description of the asynchronous parameter block, see page 12-56. See Listing 12-5 beginning on page 12-34 for an example of the use of theDBExecfunction. Descriptions of theDBSendandDBSendItemfunctions begin on page 12-77 and page 12-78, respectively. TheDBStatefunction is described next.