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 / High-Level Interface: Handling Query Documents


DBGetNewQuery

You can use the DBGetNewQuery function to create a query record.

FUNCTION DBGetNewQuery (queryID: Integer; 
                        VAR query: QueryHandle): OSErr;
queryID
The resource ID of a 'qrsc' resource.
query
Returns a handle to the query record.
DESCRIPTION
The DBGetNewQuery function creates a query record from the specified 'qrsc' resource. The resource file that contains the 'qrsc' resource must remain open until after the DBStartQuery function has completed execution. If you do not already know the resource ID of the 'qrsc' resource (for example, if you call the StandardGetFile procedure to let the user select the query document), you can use Resource Manager routines to determine the resource ID.

SPECIAL CONSIDERATIONS
The DBGetNewQuery 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 DBGetNewQuery function are
Trap macroSelector
_DBGetNewQuery$030F

RESULT CODES
noErr0No error
rcDBPackNotInited-813The InitDBPack function has not yet been called
SEE ALSO
See Listing 12-1 beginning on page 12-18 for an example of the use of the DBGetNewQuery function. For a description of the query record, see page 12-57. For a description of the 'qrsc' resource, see "The Query Resource" beginning on page 12-91. The StandardGetFile procedure is described in the chapter "Standard File Package" in Inside Macintosh: Files, and Resource Manager routines are described in the chapter "Resource Manager" in Inside Macintosh: More Macintosh Toolbox.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996