
Programming i!-Database Plus
22
i!-Database Plus and DBWizard
Functions
The following table is a list of functions contained in the NetlinxDBInclude.axi.
NetlinxDBInclude.asp Functions
DB_ACK_QUE()
Acknowledges the queue
so the next
message can be sent in
the queue structure.
The
DB_ACK_QUE
function is used to acknowledge the last message sent by the
queue. It should be called whenever a message is properly processed in the
DATA_EVENT
for the database server script connection. This function also closes
the IP socket used by the
sDB_CLIENT
structure.
Syntax:
DB_ACK_QUE (_sDB_QUE sDB_QUE, _sDB_CLIENT sDB_CLIENT)
Variable:
sDB_QUE = Represents the sDB_QUE for a given database server script
connection. (Required.)
sDB_CLIENT = Represents the sDB_CLIENT for a given database server script
connection. (Required.)
Return Values:
DB_ACK_QUE does not return a value.
DB_ADD_TO_QUE()
Adds a message to the
queue structure
sDB_QUE
.
The
DB_ADD_TO_QUE
function is used to send all database requests.
Syntax:
DB_ADD_TO_QUE(_sDB_QUE sDB_QUE, CHAR strHDR[], CHAR
strSQL[], _sDB_Listbox sTempListBox)
Variables:
sDB_QUE = Represents the
sDB_QUE
for a given database server script
connection. (Required.)
srHDR = Required. Represents a header to be added to the XML response to
identify the response. (Required.)
strSQL = Required. Represents the SQL statement to be processed by the
database server script. (Required.)
sTempListBox = The listbox structure containing the start and page size
information. (Required.)
Return Values:
• 0 if the message could not be added.
• Otherwise, it returns the queue position the message was added to.
DB_BUILD_HTTP_GET()
Converts the values from
an
sDB_CLIENT
structure into a
HTTP_GET
request.
The
DB_BUILD_HTTP_GET
function is used to build the
HTTP_GET
request for a
given database operation.
Syntax:
DB_BUILD_HTTP_GET (_sDB_CLIENT sDB_CLIENT)
Variable:
sDB_CLIENT = Represents the
sDB_CLIENT
for a given database server script
connection. (Required.)
Return Values:
DB_BUILD_HTTP_GET
returns the
HTTP_GET
request as a string to be sent to
the web server.
DB_CHECK_MASTER_
VERSION()
Checks the Master’s
version and prints an error
if
XML_TO_VARIABLE
is
not supported.
Syntax:
DB_CHECK_MASTER_VERSION()
The
DB_CHECK_MASTER_VERSION
function syntax has no arguments.
Return Values:
• 1 if the Master supports the required version for
XML_TO_VARIABLE
.
• 0 if it does not.
Continued