Important: The information in this document is obsolete and should not be used for new development.
DBGetNewQuery
You can use theDBGetNewQueryfunction 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
TheDBGetNewQueryfunction creates a query record from the specified'qrsc'resource. The resource file that contains the'qrsc'resource must remain open until after theDBStartQueryfunction has completed execution. If you do not already know the resource ID of the'qrsc'resource (for example, if you call theStandardGetFileprocedure to let the user select the query document), you can use Resource Manager routines to determine the resource ID.SPECIAL CONSIDERATIONS
TheDBGetNewQueryfunction 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 theDBGetNewQueryfunction are
Trap macro Selector _DBGetNewQuery$030FRESULT CODES
noErr 0 No error rcDBPackNotInited -813 The InitDBPackfunction has not yet been calledSEE ALSO
See Listing 12-1 beginning on page 12-18 for an example of the use of theDBGetNewQueryfunction. 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. TheStandardGetFileprocedure 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.