Important: The information in this document is obsolete and should not be used for new development.
DBGetResultHandler
TheDBGetResultHandlerfunction 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
getSysHandlerparameter toFALSE(0), the function returns a pointer to the current application result handler for the specified data type, or it returnsNILif there is no application result handler for that data type. If you set thegetSysHandlerparameter toTRUE(nonzero), the function returns a pointer to the current system result handler for the specified data type, or it returnsNILif there is no system result handler for that data type.DESCRIPTION
You can use theDBGetResultHandlerfunction to obtain a pointer to a result handler so that you can use it to convert to text an individual data item retrieved by theDBGetItemfunction. TheDBGetQueryResultsfunction automatically converts to text all of the data pointed to by the results record.SPECIAL CONSIDERATIONS
TheDBGetResultHandlerfunction 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 theDBGetResultHandlerfunction 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 InitDBPackfunction has not yet been calledSEE ALSO
TheDBGetQueryResultsfunction is described on page 12-66, and theDBGetItemfunction 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.