User Guide
Programming i!-Database Plus
24
i!-Database Plus and DBWizard
NetlinxDBInclude.asp Functions (Cont.)
DB_GET_XML_VALUE()
Extracts values from XML
into NetLinx data
structures only when not
using
XML_TO_VARIABLE.
The DB_GET_XML_VALUE function is used to extract values from XML into NetLinx
data structures only when not using XML_TO_VARIABLE.
Syntax:
DB_GET_XML_VALUE(CHAR strITEM_DATA[], CHAR strTAG[])
Variable:
strITEM_DATA = Represents the XML stream containing the data to be
extracted. (Required.)
strTAG = Represents the XML tag from which the data should be extracted.
(Required.)
Return Values:
DB_GET_XML_VALUE returns the XML value for the supplied tag.
DB_INIT_CLIENT()
Extracts a database script
error from an
sDB_CLIENT structure
and prints it to the NetLinx
terminal.
The DB_INIT_CLIENT function is used to initialize the sDB_CLIENT structure. It
should be called once in DEFINE_START.
Syntax:
DB_INIT_CLIENT (_sDB_CLIENT sDB_CLIENT, DEV dvSKT, CHAR
strWS[], INTEGER nPORT, CHAR strFILE[])
Variables:
sDB_CLIENT = Represents the sDB_CLIENT for a given database server script
connection. (Required.)
dvSKT = Represents the IP device for a given database server script connection.
(Required.)
strWS = Represents the IP address or host name for the web server for a given
database server script connection. (Required.)
nPORT = Represents the IP port of the web server for a given database server
script connection. If 0 is supplied, 80 will be used. (Required.)
strFILE = Represents the Path and File of the database server script relative to
the www root of the web server for a given database server script connection. If
the path does not start with "/", a "/" is added. (Required.)
Return Values:
DB_INIT_CLIENT does not return a value.
DB_IS_TRUE()
Converts the string
"TRUE" and "FALSE" into
1 or 0, respectively.
The DB_IS_TRUE function is used to convert Boolean parameters from XML into
CHAR types in NetLinx.
Syntax:
DB_IS_TRUE (CHAR strSTR[])
Variable:
strSTR = Represents the string containing TRUE or FALSE. (Required.)
Return Values:
• 1 if the string contains TRUE.
• 0 if the string does not contain TRUE. The search is case-insensitive.
DB_LISTBOX_DOWN()
Sets the starting index of
an sDB_LISTBOX
structure to display the
next page.
The DB_LISTBOX_DOWN moves the starting index to display the next page. The
constant nDB_LISTBOX_PAGE_OVERLAP controls how the new index is
calculated. If the constant is set to 1 (default), the last item in the list will become
the first item in the list. If the constant is 0, the new page will not contain any items
from the previous page.
Syntax:
DB_LISTBOX_DOWN(_sDB_LISTBOX sTempListBox)
Variable:
sTempListBox = Represents the list box structure. (Required.)
Return Values:
DB_LISTBOX_DOWN returns the starting position of the list box.
Continued