none
MySql Connectivity using C++ RRS feed

  • Question

  • Hi,

     I want to connect to mysql database using c++.I am completely new to this one.I have never connected to database from c++.

    How to do that can anybody please help me for that. Where can i get simple example.

    Regards,

    Sachin. 

    • Moved by Helen Zhao Monday, November 21, 2011 5:49 AM (From:Visual C++ General)
    Thursday, November 17, 2011 6:27 AM

All replies

  • You will need to use some library to connect to the database -- a common interface is ODBC, there are implementations of this interface that apply to MYSQL available.

    MYSQL is not a Microsoft product, so we do not supply nor support such libraries.  You might want to start here:

    http://www.mysql.com/products/connector/

    or ask in your favorite general C++ programming forum.


    Windows C++ Team Software Development Engineer in Test
    Thursday, November 17, 2011 7:42 AM
  • Hi,

     I want to connect to mysql database using c++.I am completely new to this one.I have never connected to database from c++.

    How to do that can anybody please help me for that. Where can i get simple example.

    Regards,

    Sachin. 

    <input id="89591ea7-6fd7-4906-a3e3-d5fa60fb559b_attachments" type="hidden" />
    • Merged by Helen Zhao Monday, November 21, 2011 5:32 AM Merge them to keep in the same topic
    Thursday, November 17, 2011 9:52 AM
  • You can check with the following tutorials

    http://www.tidytutorials.com/2009/07/mysql-connector-c-example-windows-clexe.html

    http://forge.mysql.com/wiki/Connector_C%2B%2B


    Thanks and Regards Selvam http://www15.brinkster.com/selvamselvam/
    • Edited by Selvam Thursday, November 17, 2011 10:13 AM
    Thursday, November 17, 2011 10:12 AM
  • Hi sachin_khutwad,

    Welcome to the MSDN Forum.

    According to your description, I'd like to move your thread to "Off-Topic Posts" since we discuss general questions about Visual C++ in this forum.

    Please go to MYSQL::MySQL Connectors: http://www.mysql.com/products/connector/ for better solution.

    Thank you for your understanding.

    Best regards,


    Helen Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Monday, November 21, 2011 5:48 AM