
VB5/Access CGI Programming
Robert B. Denny (15-September-97)
Back to Self-Test
This is a tutorial example
This sample requires the Microsoft DAO 3.5 Object Library (dao350.dll) which is included with Visual Basic Professional 5.0 and various other data access applications.
Before looking at the sources, I strongly suggest you play around with the application and become familiar with what it does. Also, you will probably want to refer to the Windows CGI 1.3a Specification.
This is a very simple database of students, classes, and a linking table describing which student(s) are currently taking which class(es). It is meant to illustrate these important techniques:
- Using HTML forms as a front-end to a relational database
- Basic relational data access, addition, removal and updating using Visual Basic Professional 5.0
- Data normalization, and forming many-to-many relations by using a linking table
- Using Access "queries" to keep complex SQL statements in the database as precompiled, stored procedures
- Using Access' referential integrity features to simplify removal of objects which are referred-to by other objects
- Exception handling techniques that send useful error messages back to the browser instead of letting the CGI program fail silently, causing the famous "500 Server Error"
The code has almost no comments in it. This is intentional. It is meant to be used in conjunction with the O'Reilly book that is shipped with every copy of WebSite Professional.
The links below lead to the VB sources, and the Access relations, tables and queries. The Access description pages show information pictorially and in SQL source where appropriate.
There are two aspects to this application: