ODBC is the oldest, but it is still in use today. Occasionally used. DAO and RDO are old interfaces. OLE db new, complex Microsoft out of ADO. VC + + ADO is the mainstream: both MySQL and Oracle have dedicated interfaces. The ADO underlying is an OLE DB implementation. ADO is a COM component.
ADO Private Folders:
To open the StdAfx.h header file with MsADO15.dll:Import the library:
Initialize ADO when initializing an instance: Here are the COM programming requirements:
COM is used extensively inside Windows. Exception handling:
Then the entire project will be able to use ADO.
Open the dialog box:
Define two pointers in a header file: _connectionptr is defined in ADO.
Connect to the database first:
Select the first 1000 lines:
Connection error, check know, did not write the name of the server. The following check is the name of the server:
Place the Create connection part in the constructor:
To here:
The original location after clipping is:
To turn off the handling of the connection button: double-click:
Here's how to open an Access database:
Copy Open Sqlde Code:
To modify the code:
The following modifies the link string that connects Access data:
String connecting acess data: ADO is a generic database that can be used to manipulate any kind of database: Copy the code that shuts down SQL Sever.
Here's an easy way to get a link string: Just create a new text file, modify the name with the extension UDL:
Then double-click:
Choose:
Select Server Name:
Paste here:
Then open Notepad and drag the UDL file to Notepad to open:
Then copy into the code ': Add a slash:
Now link acess database:
Drag the UDL file to Notepad to open: You can get the file:
Plus a slash for C + + recognition \
From for notes (Wiz)
Cheetah mfc--cfile Family Introduction ADO Connection database open database close database connection string