
Programming i!-Database Plus
5
i!-Database Plus and DBWizard
Programming i!-Database Plus
i!-Database Plus consists of creating three files:
ASP file
AXI file
AXS file
If you already used DBWizard to generate an include file, you can skip to
Creating an AXS
file
section on page 15 to finish your programming.
Prior to explaining how to program these files, a brief overview is necessary.
Data Source Name
Setting up a DSN (Data Source Name) is an easy way to provide a path to a database. It is also easy
to change the path to the database or even the type of database without changing any code in the
applications that use it. To setup a DSN:
1.
Select
Start > Settings > Control Panel > ODBC Data Sources
, and select
System DSN
from the tabs at the top. Then, click
Add
to add a database.
2.
Select the type of database to connect to. You will be given as many choices as you have
ODBC drivers loaded. The screen allows you to enter the data source name. Pick something
relating to the database you are connecting to.
To connect to a database type not listed, contact the vendor and obtain the ODBC drivers for
that database.
3.
Connect to the database. This will vary depending on the database you chose. If you chose a
Microsoft Access (MDB) database, click
Select
under database, and browse to the MDB file.
When you are finished, click
OK
and the DSN will be added.
If you have chosen another type of database and are unsure about how to connect to the database,
contact your database administrator.
Structure Query Language (SQL)
Structure Query Language, or SQL, is a common database language used to manipulate data in
many different types of databases. In the process of writing the AXS file, you will need to generate
SQL statements to access the database.
If you are not familiar with SQL, you have a couple of options:
Learn SQL, or
Use Microsoft Access to generate SQL statements for you.
You can use DBWizard
™
to help generate the SQL statements and the NetLinx code. The
DBWizard option is the easiest and fastest way to integrate to the database.
If you want to learn SQL, there are many resources available. You can find books at your local
bookstore or use web sites. If you like reading books, check out "Lan Times, Guide to SQL" by