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 / Installing and Removing Result Handlers


DBGetResultHandler

The DBGetResultHandler 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 to FALSE (0), the function returns a pointer to the current application result handler for the specified data type, or it returns NIL if there is no application result handler for that data type. If you set the getSysHandler parameter to TRUE (nonzero), the function returns a pointer to the current system result handler for the specified data type, or it returns NIL if there is no system result handler for that data type.
DESCRIPTION
You can use the DBGetResultHandler 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 the DBGetItem function. The DBGetQueryResults function automatically converts to text all of the data pointed to by the results record.

SPECIAL CONSIDERATIONS
The DBGetResultHandler 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 DBGetResultHandler function are
Trap macroSelector
_DBGetResultHandler$0516

RESULT CODES
noErr0No error
rcDBNoHandler-811There is no handler for this data type installed for the current application
rcDBPackNotInited-813The InitDBPack function has not yet been called
SEE ALSO
The DBGetQueryResults function is described on page 12-66, and the DBGetItem 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.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996