User Guide
Programming i!-Database Plus
23
i!-Database Plus and DBWizard
NetlinxDBInclude.asp Functions (Cont.)
DB_CHECK_QUE()
Sends the next command from
the sDB_QUE to the
sDB_CLIENT database server
connection.
The DB_CHECK_QUE function is used to watch the queue and send messages
when the client is ready. It should be called once in DEFINE_PROGRAM.
Syntax:
DB_BUILD_HTTP_GET (_sDB_CLIENT sDB_CLIENT)
Variables:
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:
• 1 if a message was processed.
• 0 if not.
DB_GET_HTTP_ERROR()
Formats a NetLinx Socket
error and returns the
formatted string.
The DB_GET_HTTP_ERROR is used to print descriptive errors for HTTP return
codes. This function is a bit misnamed since it prints HTTP return code
descriptions, all of which are not errors.
Syntax:
DB_GET_HTTP_ERROR(LONG lCODE)
Variable:
lCODE = Represents the HTTP return code. (Required.)
Return Values:
DB_GET_HTTP_ERROR returns a string formatted for the error code in the
format:
HTTP_ERROR (<error code>): <error description>.
DB_GET_HTTP_HEADERS
Reads the HTTP headers
from a stream, and copies
them to an
sDB_HTTP_HEADERS
structure.
Syntax:
DB_GET_HTTP_HEADERS(CHAR strHTML[], LONG lCUR_POS,
_sDB_HTTP_HEADERS sHEADERS)
Variable:
strHTML = HTML stream. (Required.)
lCUR_POs = Position in HTML to begin parsing. (Required.)
sHEADERS = Structure to copy headers to. (Required.)
Return Values:
The function does not return a value. However, lCUR_POS will contain the
next available HTML character and sHEADERS will contain all header
information contained in the HTML stream that overlaps with members of
sDB_HTTP_HEADERS.
Remarks:
The DB_GET_HTTP_HEADERS is used to process HTTP headers. It is called
by DB_PROCESS_HTTP_HEADER().
DB_GET_IP_ERROR
Formats a NetLinx Socket
error and returns the
formatted string.
Syntax:
DB_GET_IP_ERROR(LONG lERR)
Variable:
lERR = Represents the NetLinx error code from DATA_NUMBER. (Required.)
Return Values:
DB_GET_IP_ERROR returns a string formatted for the error code in the
format:
IP ERROR (<error code>): <error description>
(<applicable function>).
Continued