Important: The information in this document is obsolete and should not be used for new development.
Data Access Manager Routines
The Data Access Manager has high-level routines, low-level routines, and routines that manipulate result handlers. This section describes all of the Data Access Manager routines.All of the low-level routines and some of the high-level routines accept a pointer to an asynchronous parameter block as a parameter. For these routines, see "The Asynchronous Parameter Block" beginning on page 12-56 for a description of the fields in the parameter block.
If you specify a nonzero value for the pointer to the asynchronous parameter block, the database extension executes the function asynchronously--that is, it returns control to the Data Access Manager before the routine has completed execution, and the Data Access Manager returns control to your application. If you specify
NIL
for this parameter, the database extension does not return control to your application until the routine has finished execution. Your application must call the Event Manager'sWaitNextEvent
function periodically to allow an asynchronous routine to complete execution. TheWaitNextEvent
function is described in the chapter "Event Manager" in Inside Macintosh: Macintosh Toolbox Essentials.You can tell when an asynchronous routine has completed execution and check the result code by looking at values in the asynchronous parameter block. You can use the
DBKill
function to cancel an asynchronous routine.
- Note
- A
noErr
result code returned by a routine that has been called asynchronously indicates only that the routine began execution successfully. You must check theresult
field of the asynchronous parameter block for the final result of the routine.- Assembly-Language Note
- You can invoke each of the Data Access Manager routines with a macro that has the same name as the routine, but preceded with an underscore; for example, the macro for the
DBInit
function is named_DBInit
. Each of these macros places a routine selector in the D0 register and calls the trap_Pack13
. The routine selectors are listed in each routine description and in "Assembly-Language Summary" beginning on page 12-104.
Subtopics
- Initializing the Data Access Manager
- High-Level Interface: Handling Query Documents
- High-Level Interface: Handling Query Results
- Low-Level Interface: Controlling the Session
- Low-Level Interface: Sending and Executing Queries
- Low-Level Interface: Retrieving Results
- Installing and Removing Result Handlers