GRANT OF LICENSE. AMX Corporation grants to you the right to use the enclosed i!-DatabasePlus and DBWizard
software program (the SOFTWARE) on a single central processing unit (CPU). This license is for object code only and
does not convey any rights to use of the source code.
This Agreement does not authorize you to distribute the SOFTWARE.
COPYRIGHT. The SOFTWARE is owned by AMX Corporation, and is protected by United States copyright laws and
international treaty provisions. Therefore, you must treat the SOFTWARE like any other copyrighted material (e.g., a
book or musical recording) except
val purposes, or (b) transfer the SOFTWARE to a single hard disk provided you keep the original solely for backup or
archival purposes. You may not copy the written materials accompanying the SOFTWARE.
OTHER RESTRICTIONS. You may not rent or lease the SOFTWARE, but you may transfer the SOFTWARE and
accompanying written materials on a permanent basis provided you retain no copies and the recipient agrees to the
terms of this Agreement. You may not reverse engineer, decompile, or disassemble the SOFTWARE. If the SOFTWARE is an update or has been updated, any transfer must include the most recent update and all prior versions.
You may use only one version of the SOFTWARE at any time. You may not use the version of the SOFTWARE not
being run on your CPU on any other CPU or loan, rent, lease or transfer them to another user whether with or without
consideration.
LIMITED WARRANTY
LIMITED WARRANTY. AMX Corporation warrants that the SOFTWARE will perform substantially in accordance with
the accompanying written materials for a period of ninety (90) days from the date of receipt. Any implied warranties on
the SOFTWARE and hardware are limited to ninety (90) days and one (1) year, respectively. Some states/countries do
not allow limitations on duration of an implied warranty, so the above limitation may not apply to you.
CUSTOMER REMEDIES. AMX Corporation’s entire liability and your exclusive remedy shall be, at AMX Corporation's
option, either (a) return of the price paid, or (b) repair or replacement of the SOFTWARE that does not meet AMX Corporation's Limited Warranty and which is returned to AMX Corporation. This Limited Warranty is void if failure of the
SOFTWARE or hardware has resulted from accident, abuse, or misapplication. Any replacement SOFTWARE will be
warranted for the remainder of the original warranty period or thirty (30) days, whichever is longer.
NO OTHER WARRANTIES.
not limited to implied warranties of merchantability and fitness for a particular purpose, with regard to the SOFTWARE,
the accompanying written materials, and any accompanying hardware. This limited warranty gives you specific legal
rights. You may have others which vary from state/country to state/country.
NO LIABILITY FOR CONSEQUENTIAL DAMAGES
whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business
information, or any other pecuniary loss) arising out of the use of or inability to use this AMX Corporation product, even
if AMX Corporation has been advised of the possibility of such damages. Because some states/countries do not allow
the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you.
that you may either (a) make one copy of the SOFTWARE solely for backup or archi-
AMX Corporation disclaims all other warranties, either expressed or implied, including, but
. In no event shall AMX Corporation be liable for any damages
U.S. GOVERNMENT RESTRICTED RIGHTS
The SOFTWARE and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the
Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of The Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19, as applicable. Manufacturer is AMX Corporation, 3000 Research Drive,
Richardson, TX 75082.
If you acquired this product in the United States, this Agreement is governed by the laws of the State of Texas.
Should you have any questions concerning this Agreement, or if you desire to contact AMX for any reason, please
write: AMX Corporation, 3000 Research Drive, Richardson, TX 75082.
Personal Web Server (PWS); either is available for all operating systems listed above.
A NetLinx Master with Ethernet
Supported Operating Systems
Windows 95/98 (with at least 48 MB of installed memory)
Windows NT 4.0 Workstation or Server (service pack 6 B or greater, with at least 64 MB
of installed memory)
Windows 2000 Professional or Server (running on a Pentium 233 MHz processor
i!-Database Plus and DBWizard
(minimum requirement); 300 MHz or faster recommended, with 96 MB of installed
memory.)
1
Introduction
Minimum PC Requirements
Windows-compatible mouse (or other pointing device)
At least 5 MB of free disk space (150 MB recommended)
VGA monitor, with a minimum screen resolution of 800 x 600
A Network adapter
A Web server such as Personal Web Server (PWS) or Internet Information Server (IIS).
Windows 95
Windows 2000
®
/98®, and NT 4.0® Workstation uses PWS.
®
Professional or Server, and Windows NT 4.0® Server uses IIS.
Installing i!-Database Plus
1. In Explorer, double-click i!-DatabasePlusSetup.exe from the directory window where you
downloaded the i!-Database Plus install program.
2. After reading the License Agreement, select I Agree and Next to proceed.
3. The Welcome To i!-Database Plus Setup dialog appears, reminding you to close all Windows
programs before going any further. Click Next to proceed.
4. In the i!-DatabasePlus Select Components dialog, select which example programs you would
like to install.
5. In the Select i!-Database Plus Install Location dialog, use the Browse button to navigate to a
directory other than the default install directory, if desired. Click Next.
6. In the i!-Database Plus Shortcut Creation dialog, select Install Shortcut Icons for the installed
components on your desktop, if desired.
7. Click Next in the Start i!-Database Plus Installation dialog to install the selected components.
8. The program prompts you to restart your system to complete the installation.
Installing DBWizard
1. In Explorer, double-click DBWizardSetup.exe from the directory window where you
downloaded the DBWizard install program.
2. After reading the License Agreement, select I Agree and Next to proceed.
3. The Welcome To DBWizard Setup dialog appears, reminding you to close all Windows
programs before going any further. Click Next to proceed.
4. In the Select DBWizard Install Location dialog, use the Browse button to navigate to a
directory other than the default install directory, if desired. Click Next.
5. In the DBWizard Shortcut Creation dialog, select Install Shortcut Icons for the installed
components on your desktop, if desired.
6. Click Next in the Start DBWizard Installation dialog to install the selected components.
7. The program prompts you to restart your system to complete the installation.
2
i!-Database Plus and DBWizard
Introduction
Setup
NetLinxDBInclude.asp and NetLinxDBInclude.axi work in conjunction with your code to allow
access to a PC database. In order to use these two files, you will need the following:
A PC running a Microsoft Windows
Windows NT Workstation, Windows NT Server, Windows 2000 Workstation or
Windows 2000 Server.
A Web server. You can use Microsoft Internet Information Server (IIS) or Microsoft
Personal Web Server (PWS). Either is available for all operating systems listed above.
A NetLinx Master with Ethernet
You must have IIS or PWS installed and running ASP (Active Server Pages) before beginning.
Make sure there were no errors during the installation of the web server, and you can call up an
ASP file (any file ending in .ASP). If you get a 500 Internal Server Error message when trying to
view ASP pages in a web browser, the web server is not installed properly. You must correct this
problem before proceeding.
Once the server PC is setup, make sure both the server PC and the NetLinx Master are connected to
a network and can communicate with each other. A simple way to test connectivity is by using the
PING program from the server PC's command line. Type Ping <ip address of the NetLinx
Master> and you should see something like the following:
C:\WINDOWS\Desktop>ping 192.168.13.33
Pinging 192.168.13.33 with 32 bytes of data:
Reply from 192.168.13.33: bytes=32 time<10ms TTL=62
Reply from 192.168.13.33: bytes=32 time<10ms TTL=62
Reply from 192.168.13.33: bytes=32 time<10ms TTL=62
Reply from 192.168.13.33: bytes=32 time=1ms TTL=62
Ping statistics for 192.168.13.33: Packets:
Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
If you are familiar with Access, build the queries in Access and switch to the SQL view from the
View menu to see what you built. This provides a simple and intuitive way to build your SQL.
The last and easiest option is to use AMX's DBWizard program. This program peeks into your
database and helps you build the SQL to read and write to any of the tables or views in the database.
It also generates a large amount of the NetLinx code for you, so your development time is greatly
reduced. This program is available from www.amx.com.
HTTP, CGI and XML
HTTP (Hyper-Text Transfer Protocol)
An example URL to retrieve records 1 - 5 from a table called Titles is:
http://server/databasescript.asp?SQL=SELECT * FROM Titles&Ps=5&start=21
where:
®
help file. Microsoft has put a lot of good
server
databasescript.asp
?SQL=SELECT * FROM
Name of web server
Name of server script
CGI Parameters
Titles&Ps=5&start=21
You can use a URL like this to run a query directly against the server script, like the NetLinx
system. This is often useful during testing to make sure the server script is operating properly.
If you do use a URL like this, you will notice that once you hit enter, the spaces are
replaced with %20. URL's have a certain set of characters that are excluded from
normal use. These include space, question mark, ampersand, slash and colon. The
reason for this is these characters are used in other parts of URL's. To use them
again would cause confusion during URL parsing. One of the functions in the
NetLinxDBInclude.axi file takes care of this conversion for you.
CGI (Common Gateway Interface)
CGI provides a simple way to pass parameters to a program from an HTTP request. Most
commonly, the CGI parameters appear directly on the URL line. For example:
http://www.somehost.com/index.htm?myname=amx&myhometown=dallas. The first part of
the URL looks familiar: it contains a protocol, a host name and a file to retrieve
(protocol = http://, host=www.somehost.com, file=/index.htm). The last part is CGI. CGI
parameters are passed in name-value pairs separated by an "=". The "?" is used to signify the start
of CGI parameters. The "&" is used to separate CGI parameters. So this URL contains two CGI
parameters: the first is a CGI parameter called myname and contains a value of amx. The second is
myhometown and contains a value of dallas. The CGI application on the web server has access to
these variables and can use them to help understand the context in which the request was made.
6
i!-Database Plus and DBWizard
Programming i!-Database Plus
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.
CGI Parameters
Parameter Parameter Name DescriptionNotes
sqlSQL statementThe SQL statement passed to the database.Required.
psPage SizeOptional. Number of records to retrieve from a record
set.
startStart IndexOptional. Starting index in record set to retrieve values
from.
hdrHeaderOptional. Echoed by the server script to identify the
XML packet.
absAbsoluteOptional. Return indexes are absolute.Default is relative.
pnlPanel IndexOptional. Echoed by the server script to identify as
Panel Index.
Default is 10.
Default is 1.
Default is "Unknown".
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>