Delphi Programming Guide
Delphi Programmer 

Menu  Table of contents
Bookmark and Share

Part I - Foundations
  Chapter 1 Ц Delphi 7 and Its IDE
  Chapter 2 Ц The Delphi Programming Language
  Chapter 3 Ц The Run-Time Library
  Chapter 4 Ц Core Library classes
  Chapter 5 Ц Visual Controls
  Chapter 6 Ц Building the User Interface
  Chapter 7 Ц Working with Forms
Part II - Delphi Object-Oriented Architectures
  Chapter 8 Ц The Architecture of Delphi Applications
  Chapter 9 Ц Writing Delphi Components
  Chapter 10 Ц Libraries and Packages
  Chapter 11 Ц Modeling and OOP Programming (with ModelMaker)
  Chapter 12 Ц From COM to COM+
Part III - Delphi Database-Oriented Architectures
  Chapter 13 Ц Delphi's Database Architecture
  Chapter 14 Ц Client/Server with dbExpress
  Chapter 15 Ц Working with ADO
  Chapter 16 Ц Multitier DataSnap Applications
  Chapter 17 Ц Writing Database Components
  Chapter 18 Ц Reporting with Rave
Part IV - Delphi, the Internet, and a .NET Preview
  Chapter 19 Ц Internet Programming: Sockets and Indy
  Chapter 20 Ц Web Programming with WebBroker and WebSnap
  Chapter 21 Ц Web Programming with IntraWeb
  Chapter 22 Ц Using XML Technologies
  Chapter 23 Ц Web Services and SOAP
  Chapter 24 Ц The Microsoft .NET Architecture from the Delphi Perspective
  Chapter 25 Ц Delphi for .NET Preview: The Language and the RTL
       
  Appendix A Ц Extra Delphi Tools by the Author
  Appendix B Ц Extra Delphi Tools from Other Sources
  Appendix C Ц Free Companion Books on Delphi
       
  Index    
  List of Figures    
  List of tables    
  List of Listings    
  List of Sidebars  

 
Previous Section Next Section

Microsoft Data Access Components (MDAC)

ADO is part of a bigger picture called Microsoft Data Access Components (MDAC). MDAC is an umbrella for Microsoft's database technologies and includes ADO, OLE DB, ODBC, and RDS (Remote Data Services). Often you will hear people use the terms MDAC and ADO interchangeably, but incorrectly. Because ADO is only distributed as part of MDAC, we talk of ADO versions in terms of MDAC releases. The major releases of MDAC have been versions 1.5, 2.0, 2.1, 2.5, and 2.6. Microsoft releases MDAC independently and makes it available for free download and virtually free distribution (there are distribution requirements, but most Delphi developers will have no trouble meeting them). MDAC is also distributed with most Microsoft products that have database content. Delphi 7 ships with MDAC 2.6.

There are two consequences of this level of availability. First, it is highly likely that your users will already have MDAC installed on their machines. Second, whatever version your users have, or you upgrade them to, it is also virtually certain that someone—you, your users, or other application software—will upgrade their existing MDAC to the current release of MDAC. You can't prevent this upgrade, because MDAC is installed with such commonly used software as Internet Explorer. Add to this the fact that Microsoft supports only the current release of MDAC and the release before it, and you are arrive at this conclusion: Applications must be designed to work with the current release of MDAC or the release before it.

As an ADO developer, you should regularly check the MDAC pages on Microsoft's website at www.microsoft.com/data. From there you can download the latest version of MDAC for free. While you are on this website, you should take the opportunity to download the MDAC SDK (13 MB) if you do not already have it or the Platform SDK (the MDAC SDK is part of the Platform SDK). The MDAC SDK is your bible: Download it, consult it regularly, and use it to answer your ADO questions. You should treat it as your first port of call when you need MDAC information.

OLE DB Providers

OLE DB providers enable access to a source of data. They are ADO's equivalent to the dbExpress drivers and the BDE SQL Links. When you install MDAC, you automatically install the OLE DB providers shown in Table 15.1:

Table 15.1: OLE DB Providers Included with MDAC

Driver

Provider

Description

MSDASQL

ODBC Drivers

ODBC drivers (default)

Microsoft.Jet.OLEDB.3.5

Jet 3.5

MS Access 97 databases only

Microsoft.Jet.OLEDB.4.0

Jet 4.0

MS Access and other databases

SQLOLEDB

SQL Server

MS SQL Server databases

MSDAORA

Oracle

Oracle databases

MSOLAP

OLAP Services

Online Analytical Processing

SampProv

Sample provider

Example of an OLE DB provider for CSV files

MSDAOSP

Simple provider

For creating your own providers for simple text data

  • The ODBC OLE DB provider is used for backward compatibility with ODBC. As you learn more about ADO, you will discover the limitations of this provider.

  • The Jet OLE DB providers support MS Access and other desktop databases. We will return to these providers later.

  • The SQL Server provider supports SQL Server 7, SQL Server 2000, and Microsoft Database Engine (MSDE). MSDE is a reduced version of SQL Server, with most of the tools removed and some code added to deliberately degrade performance when there are more than five active connections. MSDE is important because it is free and it is fully compatible with SQL Server.

  • The OLE DB provider for OLAP can be used directly but is more often used by ADO Multi-Dimensional (ADOMD). ADOMD is an additional ADO technology designed to provide Online Analytical Processing (OLAP). If you have used Delphi's Decision Cube, Excel's Pivot Tables, or Access's Cross Tabs, then you have used some form of OLAP.

In addition to these MDAC OLE DB providers, Microsoft supplies other OLE DB providers with other products or with downloadable SDKs:

  • The Active Directory Services OLE DB provider is included with the ADSI SDK; the AS/400 and VSAM OLE DB provider is included with SNA Server; and the Exchange OLE DB provider is included with Microsoft Exchange 2000.

  • The OLE DB provider for Indexing Service is part of Microsoft Indexing Service, a Windows mechanism that speeds up file searches by building catalogs of file information. Indexing Service is integrated into IIS and, consequently, is often used for indexing websites.

  • The OLE DB provider for Internet Publishing allows developers to manipulate directories and files using HTTP.

  • Still more OLE DB providers come in the form of service providers. As their name implies, OLE DB service providers provide a service to other OLE DB providers and are often invoked automatically as needed without programmer intervention. The Cursor Service, for example, is invoked when you create a client-side cursor, and the Persisted Recordset provider is invoked to save data locally.

MDAC includes many providers that I'll discuss, but many more are available from Microsoft and from the third-party market. It is impossible to reliably list all available OLE DB providers, because the list is so large and changes constantly. In addition to independent third parties, you should consider most database vendors, because the majority now supply their own OLE DB providers. For example, Oracle supplies the ORAOLEDB provider.

Tip 

A notable omission from the vendors that supply OLE DB providers is InterBase. In addition to accessing it using the ODBC driver, you can use Dmitry Kovalenko's IBProvider (www.lcpi.lipetsk.ru/prog/eng/index.html). Also check Binh Ly's OLE DB Provider Development Toolkit (www.techvanguards.com/products/optk/install.htm ). If you want to write your own OLE DB provider, this tool is easier to use than most.


 
Previous Section Next Section


 


 

Delphi 10.2 Tokyo

Delphi 10.2 Tokyo Ч самый быстрый способ создавать и обновл€ть интенсивно работающие с данными, распределенные и сильно взаимодействующие приложени€ с развитым и визуально привлекательным пользовательским интерфейсом дл€ Windows 10, Mac, мобильных устройств, IoT и других платформ.


Copyright © 2004-2018 "Delphi Sources". Delphi Programming Guide
√руппа ¬ онтакте   Facebook   —сылка на Twitter