AMX I!-DATABASEPLUS AND DBWIZARD Instruction Manual page 14

Integration!solutions
Table of Contents

Advertisement

Programming i!-Database Plus
(***********************************************************)
(*
(***********************************************************)
DEFINE_TYPE
(* TITLES *)
STRUCTURE _sDB_TITLES
{
CHAR
CHAR
CHAR
CHAR
CHAR
SLONG
}
The next section creates NetLinx variables needed to store the data and connect to the database.
The
sDB_CLIENT
of the web server database script. The
makes sure the script is sent one request at a time. The
sDB_TITLES
window, an
(***********************************************************)
(*
(***********************************************************)
DEFINE_VARIABLE
(* QUE VARS *)
VOLATILE _sDB_CLIENT
VOLATILE _sDB_QUE
(* DATABASE STRUCTURES *)
_sDB_TITLES sDB_TITLES[10]
_sDB_LISTBOX sTitleListBox
The next section creates four calls to delete, add, update and read information in the database. It is
here that we need our SQL and database setup information. When building SQL statements, you
need to know the names of the tables and/or view and usually the names of any columns you are
interested in reading or writing.
Another key piece of information is which column(s) in a table are the primary keys. Each record in
a database usually has a unique column called the primary key. This field is unique for this entry in
a given table. When deleting or updating a record in a database, you should reference the primary
key of the table to make certain it is the record you are interested in modifying.
primary key in our example.
When adding to a database, we may also need to provide a value for the primary key. In this case,
you must supply a key that is not currently used. Many databases offer a column typed called
AutoNumber
add a record to the database. When using
to specify the value since it is automatically generated.
All of these calls generate an SQL statement to run against the database. Some people may find this
part the hardest since SQL may be a new language to many people. If you are having trouble with
SQL, refer to the Structure Query Language (SQL) section on page 5.
10
TYPE DEFINITIONS GO BELOW
strArtist[128]
strCopyright[128]
strLabel[128]
strReleaseDate[128]
strTitle[128]
slTitleID
variable contains information about the current database transaction, the location
structure to hold the data from the database. In order to keep track of the discs in the
structure is needed.
sDB_LISTBOX
VARIABLE DEFINITIONS GO BELOW
sDB_CLIENT
sDB_QUE
. This is usually used as a unique key that automatically increments every time you
variable keeps track of all database request and
sDB_QUE
sDB_TITLES
(* DB CLIENT *)
(* dB QUE *)
(* TITLES *)
types for your primary key, you do not need
AutoNumber
*)
variable is an array of the
*)
is the
TitleID
i!-Database Plus and DBWizard

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the I!-DATABASEPLUS AND DBWIZARD and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

I!-databaseplusDbwizard

Table of Contents