Programming ADO SQL Server Applications

ADO and SQL Server

ADO and SQL Server

Programming ADO SQL Server Applications

Microsoft® ActiveX® Data Objects (ADO) is a data access interface used to communicate with OLE DB-compliant data sources, such as Microsoft SQL Server™ 2000. Data consumer applications can use ADO to connect to, retrieve, manipulate, and update data from an instance of SQL Server.

Architecturally, ADO is an application-level interface that uses OLE DB, a library of COM interfaces that enables universal access to diverse data sources. Because ADO uses OLE DB as its foundation, it benefits from the data access infrastructure that OLE DB provides; yet shields the application developer from the necessity of programming COM interfaces. Developers can use ADO for general-purpose access programs in business applications (Accounting, Human Resources, and Customer Management), and use OLE DB for tool, utility, or system-level development (development tools and database utilities).

The ADO topics emphasize the use of ADO 2.6 with SQL Server 2000, and are not intended as a general primer in using ADO. For more information about ADO 2.6, see the ADO documentation in the Microsoft Data Access Components (MDAC) SDK, located in the MSDN Library at Microsoft Web site. The ADO sections in MSDN Online contain ADO getting started topics and reference topics for ADO objects, collections, properties, and methods.

Data sources in SQL Server 2000 are suited for access through ADO. Because SQL Server is OLE DB-compliant, you can use ADO to develop client applications, service providers, Web applications, and business objects that access data in SQL Server 2000.

When programming ADO applications, consider:

  • Which OLE DB provider to use.

  • Which development environment to use.

  • Additional data access requirements (for example, cursor types, transaction management, stored procedure usage, and so on).

A developer might also consider using Microsoft Remote Data Services (RDS). RDS is a Web-based technology that uses Microsoft Internet Information Services (IIS) and special ActiveX controls to bind data from an SQL data source to data controls on a Web page. RDS is integrated with ADO technology. For more information about RDS, see the RDS documentation in the Microsoft Data Access Components (MDAC) SDK, located in the Platform SDK in MSDN Online.

ADO can also be integrated with Microsoft® ActiveX® Data Objects (Multidimensional) (ADO MD), which you can use to browse a multidimensional schema, and query and retrieve the results of a cube; and Microsoft® ActiveX® Data Objects Extensions for Data Definition Language and Security (ADOX), which includes objects for schema creation and modification, and security.