I recently made an online banking project in Niit.bangalore. This project is written almost in VB, and only a small part of it involves the ATL component, which only teaches us to write distributed applications. I wrote a middle-tier component that used ATL and ADO to query back-end (SQL Server) and some of the code was shown here.
I assume that the reader understands (at least) ATL's COM programming and VB's ADO programming
What is ADO?
ADO is an abbreviation for an ActiveX Data Object (ActiveX). ADO uses OLE DB data support to provide an object-oriented interface to access data sources, a synthesizer of the DAO and RDO object model, which brings together the advantages of DAO and RDO.
C + + writing an OLE DB program is easy. However, it is difficult to implement OLE DB for languages that do not provide pointers and other C + + features, such as visual Basic.
That's why ADO really faces. ADO is an advanced interface for OLE DB based on COM interface technology, so any application that supports COM can implement ADO.
Features of ADO
Allow access to all data types
Provide free threading
Provide asynchronous queries
Provides client and server-side pointers
To provide a separate set of records
The architecture of ADO
In the ADO model, we will use three main types of objects:
Connection
Command
Recordset
The Connection object is used to establish a connection to the data source, where, first, the data source name, location, user ID, password, etc. are stored in the ConnectionString object to be passed to the Connection object to connect to the data source.
Command objects are used to execute SQL commands, queries, and stored procedures
When a query is executed, it returns a set of result sets that are stored by the Recordset object, and the data in the recordset can be modified and updated to the database.