A Simple Client/Server ADO Application

Visual Studio 6.0

OK, ready for some really interesting stuff? Let's create a form where a web surfer anywhere on the planet can request information from the database on your server. We will allow the surfer to request a form that permits the user to request all of the titles from a specific Publisher. The web surfer will be asked to enter a publisher ID number. Now of course, this could be any sort of request you can think of. Possibly you will let your employees in Europe access the corporate telephone book in Washington DC, for example. The possibilities are only limited by your imagination. Our server will get information from the user and use an ADO connection and recordset to retrieve the data. Then we will use the already familiar HTML tags to display the data the user requested.

We will create two pages. The first will be called request.htm. This is a standard HTML page so we use the extension .htm. Now when a user logs into your server, they can specify the page http://yourcomputer/request.htm. However, if you named the form default.htm, then this is the form that would be displayed as soon as the surfer logged into your site.

The second page will be an Active Server Page that we will call results.asp. The server will use ADO to retrieve all of the records that meet the request and then ASP scripting will be used to format the display of those records. If no records meet the request, then the requester will be notified.

© 1998 by Wrox Press. All rights reserved.

Show: