欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

C-Sharpcorner

程序员文章站 2022-05-15 16:14:14
...
Introduction

Open Database Connectivity (ODBC) is a widely accepted application programming interface (API) for database access. It is based on the Call-Level Interface (CLI) specifications from X/Open and ISO/IEC for database APIs and uses Structured Query Language (SQL) as its database access language. And before using this we need to install its driver in the following procedure.
In the Following article we will see this how to install MySQL ODBC driver with complete snapshots :
MySQL ODBC driver installation

Step 1:We should install the ODBC driver MyODBC 2.5 that fits with your Microsoft operating system. You will find all the lastest version drivers and the documentation on the Web:MySQL Downloads.
The following example uses the Connector/ODBC 3.51 that we downloaded in an MSI format.
MyODBC-3.51.11-2-win.msi

C-Sharpcorner
Step 2:The next screen will show you the read me info:

C-Sharpcorner
Step 3:The installation proceeds and the files are copied.
C-Sharpcorner
Step 4: MySQL ODBC driver configuration
The Driver configuration can be done directly from the Microsoft Windows ODBC Data Source Administrator tool.
To access this ODBC Data Source Administrator tool, open the Control Panel, select Adminstrative Tools, the Data Source (ODBC).
The following screen is displayed:
C-Sharpcorner
If you have installed the MySQL ODBC 3.51 driver you should see it in the driver tab.
Step 5:DSN Settings
What is a DSN: (short for Data Source Name). Data Source Name provides connectivity to a database through an ODBC driver. The DSN contains database name, directory, database driver, UserID, password and other information. Once you create a DSN for a specific database, you can use the DSN in an application to call information from the database.
There are the following three types of DSNs:

  1. System DSN:can be used by anyone with access to the machine. DSN info is stored in the registry.
  2. User DSN:created for a specific user. Also stored in the registry.
  3. File DSN:DSN info is stored in a text file with a .DSN extension.

We choose to create aSystem DSN. We select the System DSN tab and then click next on the Add button, a list of drivers is displayed. We choose the MySQL ODBC driver.
C-Sharpcorner
Step 6:MySQL ConnectorODBC settings

The Connector ODBC windows setup is displayed.

C-Sharpcorner
Now the new DSN is available in the DSN list.

C-Sharpcorner

推荐阅读