Hi,
If anyone can help me with this I would be much appreciative.
So far the output of my app is :
QSqlDatabase: QODBC driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC
Which I find incredibly weird.. I compiled the ODBC drivers, and copied them just about everywhere to find where they belong. So now it finds them.
But when I go to actually use them the lastError() from the connection just gives me "Driver not loaded Driver not loaded"
Current Code:
{
cout << "OH HELL NO" << endl;
}
try {
db.setHostName("Adams");
db.setDatabaseName("oms_gdl");
db.setUserName("user");
db.setPassword("fakepasswordhere");
bool ok = db.open();
bool openerror = db.isOpenError();
if (ok && !openerror)
{
}
}catch(...){}
QSqlDatabase db = QSqlDatabase::addDatabase("QODBC", con->name().c_str());
if(!QSqlDatabase::isDriverAvailable("QODBC"))
{
cout << "OH HELL NO" << endl;
}
try {
db.setHostName("Adams");
db.setDatabaseName("oms_gdl");
db.setUserName("user");
db.setPassword("fakepasswordhere");
bool ok = db.open();
bool openerror = db.isOpenError();
if (ok && !openerror)
{
}
}catch(...){}
To copy to clipboard, switch view to plain text mode
.pro
QT += core gui sql xml
CONFIG += sql
sql-plugins += odbc
I have tried 3 or 4 different connection strings, including a terribly attempt at integrated security. :/
Im terribly new at databases and networking, so any pointers or tutorials would be fantastic.
So far none of the other forums posts have been of any help past compiling and moving the files into the right directory, one of them seem to have this problem.
Thanks for any help you can offer.
Bookmarks