Important: The information in this document is obsolete and should not be used for new development.
DBSend
You can use theDBSend
function to send a query or a portion of a query to a data server.
FUNCTION DBSend (sessID: LongInt; text: Ptr; len: Integer; asyncPB: DBAsyncParmBlkPtr): OSErr;
sessID
- The session ID that was returned by the
DBInit
function.text
- A pointer to the query or query fragment that you want to send to the data server. The query or query fragment must be a character string.
len
- The length of the character string. If the
len
parameter has a value of -1, then the character string is assumed to beNULL
terminated (that is, the string ends with aNULL
byte); otherwise, thelen
parameter specifies the number of bytes in the string.asyncPB
- A pointer to an asynchronous parameter block. If you do not want to call the function asynchronously, set this parameter to
NIL
.DESCRIPTION
TheDBSend
function sends a query or a portion of a query to the data server. The data server appends this portion of the query to any portion you sent previously. Because the Data Access Manager does not modify the string you send in any way, it does not insert any delimiter between fragments of queries that you send to the data server. If you want a blank or a semicolon to be included between query fragments, or if you want to use return characters to divide the query into lines of text, you must include them in the character string that you send with this function.The data server does not execute the query until you call the
DBExec
function.SPECIAL CONSIDERATIONS
TheDBSend
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 theDBSend
function are
Trap macro Selector _DBSend $0706 RESULT CODES
noErr 0 No error rcDBError -802 Error trying to send text rcDBBadSessID -806 Session ID is invalid rcDBAsyncNotSupp -809 The database extension does not support asynchronous calls rcDBPackNotInited -813 The InitDBPack
function has not yet been calledSEE ALSO
For a description of the asynchronous parameter block, see page 12-56. See Listing 12-4 beginning on page 12-32 for an example of the use of theDBSend
function in sending a query fragment. See page 12-79 for a description of theDBExec
function.