Important: The information in this document is obsolete and should not be used for new development.
DBGetResultHandler
TheDBGetResultHandler
function returns a pointer to a result handler for a specified data type.
FUNCTION DBGetResultHandler (dataType: DBType; VAR theHandler: ProcPtr; getSysHandler: Boolean): OSErr;
dataType
- The data type for which to install a result handler.
theHandler
- Returns a pointer to the result handler.
getSysHandler
- If you set the
getSysHandler
parameter toFALSE
(0
), the function returns a pointer to the current application result handler for the specified data type, or it returnsNIL
if there is no application result handler for that data type. If you set thegetSysHandler
parameter toTRUE
(nonzero), the function returns a pointer to the current system result handler for the specified data type, or it returnsNIL
if there is no system result handler for that data type.DESCRIPTION
You can use theDBGetResultHandler
function to obtain a pointer to a result handler so that you can use it to convert to text an individual data item retrieved by theDBGetItem
function. TheDBGetQueryResults
function automatically converts to text all of the data pointed to by the results record.SPECIAL CONSIDERATIONS
TheDBGetResultHandler
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 theDBGetResultHandler
function are
Trap macro Selector _DBGetResultHandler $0516 RESULT CODES
noErr 0 No error rcDBNoHandler -811 There is no handler for this data type installed for the current application rcDBPackNotInited -813 The InitDBPack
function has not yet been calledSEE ALSO
TheDBGetQueryResults
function is described on page 12-66, and theDBGetItem
function is described on page 12-84. See "Converting Query Results to Text" beginning on page 12-43 for a list of the data types for which Apple provides system result handlers. Listing 12-6 on page 12-46 shows a sample result handler.