User Guide
Programming i!-Database Plus
7
i!-Database Plus and DBWizard
The NetLinx Database Gateway uses CGI to pass the database request to the server script. Both the
NetLinxDBInclude.axi and NetLinxDBInclude.asp must agree to use the same CGI parameters to
pass this information. The standard set of CGI parameters they use are in the following table.
XML (Extensible Markup Language)
Once the request is made, the server script opens the database, executes the SQL statement, and
retrieves the results. Once the script has these results, it converts all the records into XML format.
XML allows any data to be formatted in a structured way. XML is ideal for packaging up the results
from the database query and returning them to the NetLinx Master. The NetLinx code can then
parse this XML and extract the information the XML contains.
The XML format used by the NetLinx Database Gateway conforms to a certain standard so that the
NetLinxDBInclude.axi always knows how find and parse the data. An example of this format is
shown below (the actual data is highlighted to make it easier to read):
<rsHeader>
<struct>
<var><name>Start</name><data>1</data></var>
<var><name>PageSize</name><data>10</data></var>
<var><name>NumberRecords</name><data>3</data></var>
<var><name>TotalRecords</name><data>3</data></var>
</struct>
<array>
<struct>
<index>1</index>
<var><name>TitleID</name><data>11101000</data></var>
<array><name>Artist</name><string>Buffet, Jimmy</string></array>
<array><name>Title</name><string><![CDATA[Living & Dying in 3/4 Time]]>
</string></array>
<array><name>Copyright</name><string>MCA</string></array>
<array><name>Label</name><string>MCA</string></array>
<array><name>ReleaseDate</name><string>1974</string></array>
<var><name>NumTracks</name><data>11</data></var>
</struct>
<struct>
<index>2</index>
<var><name>TitleID</name><data>17248229</data></var>
<array><name>Artist</name><string>Buffet, Jimmy</string></array>
<array><name>Title</name><string>Off to See the Lizard</string></array>
<array><name>Copyright</name><string>MCA</string></array>
<array><name>Label</name><string>MCA</string></array>
<array><name>ReleaseDate</name><string>1989</string></array>
<var><name>NumTracks</name><data>12</data></var>
</struct>
CGI Parameters
Parameter Parameter Name Description Notes
sql SQL statement The SQL statement passed to the database. Required.
ps Page Size Optional. Number of records to retrieve from a record
set.
Default is 10.
start Start Index Optional. Starting index in record set to retrieve values
from.
Default is 1.
hdr Header Optional. Echoed by the server script to identify the
XML packet.
Default is "Unknown".
abs Absolute Optional. Return indexes are absolute. Default is relative.
pnl Panel Index Optional. Echoed by the server script to identify as
Panel Index.
Continued