Connect to the mysql database using ODBC in VC ++ 6.0

Source: Internet
Author: User
Tags mysql odbc driver
Welcome to the CC ++ programming community forum. interacting with 2 million technicians is the final effect of the program, including displaying, adding, and modifying data, common functions for deleting these database operations. My debugging environment is xp, mysql version is mysql4.0.231. install Mysql ODBC driver download driver from www.mysql.com

Welcome to the C/C ++ programming community forum to interact with 2 million technical staff> enter is the final effect of the program, including the display, add, modify, common functions for deleting these database operations. My debugging environment is xp, mysql version is mysql4.0.23 1. Install Mysql ODBC driver download driver from http://www.mysql.com

Welcome to the C/C ++ programming Community Forum and interact with 2 million technical staff> enter

Is the final effect of the program, including data display, add, modify, and delete common functions of these database operations.
 

My debugging environment is xp and mysql version is mysql4.0.23
 
1. Install the ODBC driver of Mysql

Download driver from http://www.mysql.com

Address: http://dev.mysql.com/downloads/connector/odbc/3.51.html#win32

I downloaded Windows ZIP/Setup. EXE.

Download the setup.exe file from the zip package and double-click it to install it. There is nothing to say. It is a silly installation.
 
2. Set ODBC Data sources

There are two ways to configure the ODBC data source for MySQL:

First: manually set

It is troublesome, but it is indeed a safer method.
 
The procedure is as follows:

Start> Control Panel> Administrative Tools> data source (ODBC). After you double-click the data source (ODBC), the following interface is displayed:
 

Click "add" in the upper-right corner to display the following interface:
 

We can see that the driver we just installed has already appeared in the list, select it, and click Finish. The following interface is displayed.
 

Enter the information required for each connection as shown in the following figure. Click "Test" to Test the connection. If the sucessful is displayed, the connection is successful.
 

[1] [2] [3] [4]

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.