Users of NeoSoft's entry level database plug-in, VisualNEO for WindowsDB, will find may of NeoDBpro's features and conventions familiar. But for those new to this realm, let's begin with a discussion about how NeoDBpro manages to get data from a database file into your VisualNEO for Windows publication.


As you know, a database can contain one or more tables, which contain records which are composed of fields. When creating or opening a database table, NeoDBpro will automatically create VisualNEO for Windows variables for each field it finds. Because NeoDBpro allows you to open up an unlimited number of databases and tables at the same time, and many tables use similar field names, NeoDBpro combines the database ID and the table's name with the field name to create a unique variable. For example, let's open a Microsoft Access database called "AddressBook":


dbpOpenAccessDatabase "MyDB" "c:\my files\AddressBook.mdb" ""


Next, let's open a table inside AddressBook called "Clients":


dbpOpenTable "MyDB" "Clients" ""


The Clients table contains the following fields:


FirstName

LastName

Street

City

State

Zip

Telephone


After opening the table, NeoDBpro would automatically create the following VisualNEO for Windows variables:


[MyDB.Clients.FirstName]

[MyDB.Clients.LastName]

[MyDB.Clients.Street]

[MyDB.Clients.City]

[MyDB.Clients.State]

[MyDB.Clients.Zip]

[MyDB.Clients.Telephone]


Each variable is a combination of the Database ID (MyDB), a period (.), the Table Name (Clients), a period (.) and the field name. Since NeoDBpro allows you to open multiple databases and tables at the same time, this method makes it unlikely that any two databases will have conflicting field names.


After opening the table, NeoDBpro copies the data from the first record into the corresponding field variables. If you've assigned these variables to Text Entry Fields or other VisualNEO for Windows objects, you will see this data appear automatically on your screen when you run your publication. For example, each of the Text Entry Fields below is assigned one of the above variables:



Only one record in the table is considered active at a time. This active, or current record, is the source of the field variables' data. If another record becomes active, the field variables are automatically updated with the contents of the new record. This linkage works both ways, so any changes to the field variables in VisualNEO for Windows are also automatically reflected in the database. This powerful link between the database and VisualNEO for Windows means that you don't need to be concerned with the complexities of reading and writing data.


Add navigation Push Buttons that call dbpPrev and dbpNext actions, and you've created a working database application using only a few NeoDBpro commands.