DBSendItem
DBSendItem
Send a single data item to the data server asyncPB);
long sessID ; is the session ID
DBType dataType; specifies the data type for the data item
short len ; specifies the length of the character string.
short places; specifies the number of decimal places for the data item
short flags; set the flags parameter to 0
void * buffer; is a pointer to the memory location of the
data item
DBAsyncParmBlkPtr asyncPB; is a pointer to the asynchronous parameter
block
The DBSendItem function sends a single data item to the data server. You can use this function to send to the data server the data that you wish to include in a
query. The database extension or the data server (depending on how the system
is implemented) converts the data item to a character string and appends it to
the query, just as the DBSend function appends a query program fragment to the query. The query is not executed until you call the DBExec function. sessID is the session ID that was returned by the DBInit function. dataType specifies the data type for the data item that you are sending to the
data server.
len specifies the length for the data item that you are sending to the data
server. The database extension and data server ignore the len
parameter if the data type has an implied length.
places specifies the number of decimal places for the data item that you are sending to the data server. The database extension and data server
ignore the places parameter for all values of the dataType parameter
except typeDecimal and typeMoney. Data types are discussed in
Getting Query Results in the section entitled
flags Set the flags parameter to 0. There are no flags currently defined
buffer is a pointer to the memory location of the data item that you want to
send. When you use the DBSendItem function to send an item of data to a data server, the database extension and data server format the
data according to the data type, length, and decimal places you
specify, convert it to a character string, and append the data to the
query.
asyncPB is a pointer to the asynchronous parameter block. If you do not want
to call the function asynchronously, set this parameter to NIL
noErr (0) No error
rcDBError (-802) Error trying to send item
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 called