ODBC basic concepts-vc ++ learning notes

Source: Internet
Author: User
Tags dbase driver manager
ODBC (OpenDatabaseConnectivity, Open Database interconnection) is an integral part of the database in Microsoft's WOSA (WindowsOpenServicesArchitecture). It establishes a set of specifications, it also provides a set of standard APIs for database access (application programming interfaces ). These APIs are completed using SQL

ODBC (Open Database Connectivity) is an integral part of the Database in Microsoft's WOSA (Windows Open Services Architecture). It establishes a set of specifications, it also provides a set of standard APIs for database access (application programming interfaces ). These APIs are completed using SQL


ODBC (Open Database Connectivity, OpenDatabaseIs related to Microsoft's WOSA (Windows Open Services Architecture ).DatabaseIt establishes a set of specifications and provides a setDatabaseStandard API (Application Programming Interface ). These APIs use SQL to complete most of their tasks. ODBC also provides support for the SQL language. You can directly send SQL statements to ODBC.

An ODBC-based applicationDatabaseDoes not rely on any DBMS, and does not directly deal with DBMS, allDatabaseThe operation is completed by the ODBC driver of the corresponding DBMS. That is to say, whether it is FoxPro, Access or OracleDatabaseWhich can be accessed using ODBC APIs. It can be seen that the biggest advantage of ODBC is that it can process allDatabase.

A complete ODBC consists of the following components:

  • Application ).

  • ODBC Manager (Administrator ). The program is located in 32-bit ODBC on Windows 95 Control Panel. Its main task is to manage the installed ODBC driver and manage the data source.

  • Driver Manager ). The driver manager is included in ODBC32.DLL and transparent to users. Its task is to manage ODBC drivers and is the most important component in ODBC.

  • Odbc api.

  • ODBC driver. Is some DLL, providing ODBC andDatabase.

  • Data source. The data source containsDatabaseLocation andDatabaseType information is actually an abstraction of data connections.

The relationship between each part is shown in Figure 10.2.


0.2 ODBC component Diagram

 

The application needs to accessDatabaseFirst, you must use the ODBC manager to register a data source.DatabaseLocation,DatabaseODBC driver and other information, establish ODBC and specificDatabase. In this way, as long as the application provides the data source name to ODBC, ODBC can be establishedDatabase.

In ODBC, ODBC APIs cannot be accessed directly.Database, Must be passed through the driver manager andDatabaseExchange information. The driver manager is responsible for passing the application's odbc api call to the correct driver. After the driver completes the corresponding operation, return the result to the application through the driver manager.

The ODBC driver is required to access the ODBC data source. You can use Visual C ++ 5.0 to install drivers such as SQL Server, Access, Paradox, dBase, FoxPro, Excel, Oracle, and Microsoft Text. by default, VC5.0 only installs drivers for SQL Server, Access, FoxPro, and dBase. if you need to install another driver, you need to re-run the installation program of VC 5.0 and select the required driver.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.