User Guide
Programming i!-Database Plus
26
i!-Database Plus and DBWizard
NetlinxDBInclude.asp Functions (Cont.)
DB_PRINT_ERROR()
Extracts a database script
error from an
sDB_CLIENT structure
and prints it to the NetLinx
terminal.
The DB_PRINT_ERROR function is used to print any database script errors to the
NetLinx terminal. This should be called whenever the XML stream from a web
server is processed.
Syntax:
DB_PRINT_ERROR (_sDB_CLIENT sDB_CLIENT)
Variables:
sDB_CLIENT = Represents the sDB_CLIENT for a given database server script
connection. (Required.)
Return Values:
• 1 if an error was found.
• 0 if no error was found.
DB_PRINT_HTML()
Prints text from HTML to
terminal.
The DB_PRINT_HTML is used to print descriptive HTTP errors.
Syntax:
DB_PRINT_HTML(CHAR strHTML[], LONG lCUR_POS)
Variable:
strHTML = Represents the HTML stream. (Required.)
lCUR_POS = Represents the position in HTML to begin parsing. (Required.)
Return Values:
DB_PRINT_HTML does not return a value.
DB_PROCESS_HTTP_
HEADER()
Extracts the HTTP
Headers Cookie value
from an sDB_CLIENT
structure.
The DB_PROCESS_HTTP_HEADER function is used to parse the response from the
server. DB_PROCESS_HTTP_HEADER looks for HTTP errors and prints a
description of the problem. This should be called whenever the XML stream from a
web server is processed.
Syntax:
DB_PROCESS_HTTP_HEADER (_sDB_CLIENT sDB_CLIENT)
Variable:
sDB_CLIENT = Represents the sDB_CLIENT for a given database server script
connection. (Required.)
Return Values:
DB_PROCESS_HTTP_HEADER returns the HTTP return code. The cookie, if any,
is also copied into the sDB_CLIENT structure.
DB_PROCESS_
LISTBOX()
Retrieves the list box
values from the XML
stream and copies them
to an sDB_LISTBOX
structure.
The DB_PROCESS_LISTBOX copies the list box values from the XML to the
sTempListBox structure.
Syntax:
DB_PROCESS_LISTBOX(_sDB_CLIENT sDB_CLIENT,_sDB_LISTBOX
sTempListBox)
Variable:
sDB_CLIENT = Represents the sDB_CLIENT for a given database server script
connection. (Required.)
sTempListBox = Represents the list box structure. (Required.)
Return Values:
DB_PROCESS_LISTBOX returns the starting position of the <array> tag in the
XML stream.
Continued