Creating the Visitors Database

In order to store information about our site visitors, create a simple database called Visitors. I just used Access to whip up this five-field table named siteVisitors. Notice that the cookieid field is type AutoNumber. This will ensure a unique entry for each new visitor to your site. We're going to quickly create this simple database.

Try It Out - Create the Visitors.mdb Database

1.  Use Access to create the database and place it in your

C:\BegDB
subdirectory. Of course if you don't happen to have Access on our machine, simply fire up Visdata and create the table.

Call the database

Visitors.mdb
and create a table called siteVisitors.

2.  The database is very simple. Please add the following fields to the siteVisitors table:

Field Name Data Type Description
FirstName Text 50
LastName Text 50
CookieID AutoNumber Primary Key
PreviousVisit Date/Time
TotalVisits Number Long Integer

Now close the file and quit Access.

Now we are ready to build our .DLL file that will manage all data access for us.

© 1998 by Wrox Press. All rights reserved.