Connecting MySQL data thro' C++
Hi,
I use libodbc.a [from unixODBC-2.2.11] and libodbc++.a [from libodbc++-0.2.3] as a static libraries in my program (C++) to connect the MySQL Server.
I have created the drivers for the MySQL and created the appropriate DSN . I have tested connectivity externally using 'isql' utility. It succeed. But when I try to connect thro' my application, it doesn't. It gives me the following error
"Failed to connect to datasource: [unixODBC][Driver Manager]Data source name not found, and no default driver specified"
though the driver and DSN are present.
If I link the libraries in a local folder like /home/test/ODBC/libodbc.a & /home/test/ODBC/libodbc++.a, it doesn't work.
But if I install as /usr/local/lib/libodbc.a & /usr/local/lib/libodbc++.a and link, then it works perfectly.
Any help will be more appreciated.
Regards,
Srini
Subject
Views
Written By
Posted
Connecting MySQL data thro' C++
4451
October 24, 2007 10:59AM
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.