Visual C + + 2013 for MySQL programming (ODBC)--(i) Package installation

Source: Internet
Author: User
Tags dsn odbc

Recently wrote some technical articles, only because of recent research more things, some projects used, so their own record, afraid of their own forgotten, if any students have their own views, can mail or reply, technical class discussion, whether or not, are welcome.

Before the operation, there must be a visual Studio 2013, other platform that I did not study, the operating system I used is Windows 8 Ultimate 64bit.

Back to the point, VC database programming operation database MySQL, using ODBC driver interface.

Instead of using MySQL's own C or C + + interface.

Install the database, you can download a large installation package here, including MySQL server and a large number of ODBC and JDBC, and other drivers.

http://dev.mysql.com/downloads/connector/odbc/

The next station that I said before has been done, the specific coding operations are as follows, and the entire series I will as far as possible involve more and deeper:

Visual C + + 2008 for MySQL Programming (ODBC)--Two operational databases

Visual C + + 2008 for MySQL Programming (ODBC)--Three querying the database

Visual C + + 2008 for MySQL Programming (ODBC)--(iv) derivation of the ultimate implementation CRecordset

Visual C + + 2008 for MySQL Programming (ODBC)--(iv) derivation of the ultimate implementation CRecordset

Visual C + + 2008 for MySQL Programming (ODBC)--(iv) The ultimate implementation of derivation CRecordset

I do not like typing, writing code also do not like comments, hehe, hanging silk habit bar.

The first is to install the database, the installation process will require the configuration of the database, configure the root user

After logging in, create the database Custemer, which contains two column--cust_id (int), Cust_name (char (100)):

OK, insert several entries:

Casually insert the entry, the content does not matter. hehe.

Configure the MySQL database ODBC driver, Control Panel-management tool-Data Source (ODBC):

Click Add to find the MySQL driver.

It is important to note that this cannot be added to the System DSN, my system is win8 64-bit, you will be prompted: Specifies that the architecture mismatch between the driver and the application in DSN must be added in the user DSN

Select to

When you are done, add the following:

Enter the configuration and click Test, which should be the day out of the window to succeed.

Open vc2013, locate the tool, connect to the database,

To add a database:

Select MySQL Database:

The configuration is as follows:

Test connection, should be successful.

Here's the article, the work of coding, the next stop.

Said before the next station has been done, the specific code operation is as follows:

Visual C + + 2013 for MySQL programming (ODBC)--Two

Visual C + + 2013 for MySQL programming (ODBC)--(i) Package installation

Related Article

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.