PDA

View Full Version : mysql server connetion problem



R.CH
5th October 2010, 21:34
Hi!
In my application, I need to connect to mysql server. I installed in my PC Mysql server and mysdl connector. I une this instruction to connect to my server:
sql::mysql::MySQL_Driver *driver;
sql::Connection *con;
driver = sql::mysql::MySQL_Driver::get_mysql_driver_instanc e();
con = driver->connect("tcp://127.0.0.1:3306", "", "");
but I got 12 errors:
sql n'est pas un nom de classe ni d'espace de nom
MySQL_Driver identificateur non déclaré
.....
please help
Great thanks

Lykurg
5th October 2010, 21:52
Hi,

where exactly is the connection to Qt? But anyway as far as I understand the French error message you haven't defined the namespaces you use for the MySQL_Driver.