ADO Sample Applications

To help introduce using ADO with Microsoft® SQL Server™, SQL Server version 7.0 includes two simple query applications:

If you are a SQL Server user new to ADO, or are new to using ADO with SQLOLEDB, these samples should get you started. The samples are not intended to be fully featured applications or demonstrations of the complete range of data access capabilities available through ADO; rather, they are designed to cover some basic areas of ADO usage with SQL Server, such as connecting to SQL Server, querying, editing, and updating a data source, handling multiple result sets, and enumerating provider errors.

ADO Introductory Visual Basic Sample

This sample application uses ADO to connect to and query a SQL Server data source through SQLOLEDB.

Code portions from the sample are used in several of the Programming ADO topics (for example, in Connection Object) to illustrate key points. To view the code in its entirety and run the sample:

When building your own ADO application, if you have upgraded to Visual Basic 6.0, you may want to take advantage of some of the new Visual Basic 6.0 data handling tools not covered in this sample, such as the ADO Data Binding Control. Features such as these allow the building of client applications to databases with a minimum amount of code. For more information on building a simple database using the DataGrid and ADO Data Control, see the help topics in the MSDN™ Library, Microsoft Visual Studio® version 6.0 edition.

ADO Web Application Sample

This sample application demonstrates how to use ADO to build a Web application that interacts with a SQL Server 7.0 database. The sample models an inventory management system based on the Products and Categories tables in the SQL Server Northwind database. The application allows you to view the products and categories, make updates to product information, add new products, and remove products.

To use this sample, you should have a basic understanding of Active Server Pages and Microsoft Internet Information Services (IIS) 4.0. The application was developed in Microsoft Visual InterDev version 6.0, written in Visual Basic Scripting Edition and HTML, and run with Microsoft’s Active Server technology. For the sample to work, your server must be running Microsoft Windows NT® Server 4.0 and have the Windows NT Option Pack 4.0 installed. The sample includes six .asp files, one global .asa file, and two .html files. The .asp and .html files can be opened and edited in any text editor.

To run the sample, you need to do the following:

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.