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