Re: How to bind data using C++ and MySQL?
Posted by: pramod kumar
Date: May 02, 2011 06:22AM

This example code above will compile and run, but doesn't actually do anything - first the C++ code must make a connection to the MySQL database:
//connection = mysql_real_connect(&mysql,"host","user","password","database",0,0,0);
connection = mysql_real_connect(&mysql,"localhost","bainm","not_telling","cpp_data",0,0,0);
if (connection == NULL) {
cout << mysql_error(&mysql) << endl;
return 1;

Read more at Suite101: Using a MySQL Database with C++: How to Access MySQL Stored Functions from a C++ Program |

Options: ReplyQuote

Written By
Re: How to bind data using C++ and MySQL?
May 02, 2011 06:22AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.