MacOS ODBC issue
-
Hi,
I'm having problem with ODBC under MacOS 10.6.@QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
QString dsn = QString("DRIVER={FileMaker ODBC};SERVER=%1;DATABASE=%2;UID=%3;PWD=%4;").arg(serverName).arg(dbName).arg(user).arg(pass);
db.setDatabaseName(dsn);
if(!db.open())
{
cout << qPrintable(db.lastError().text()) << endl;
return -1;
}
QSqlQuery q(db);
//q.setForwardOnly(true);
if(!q.exec("SELECT * FROM test"))
{
cout << qPrintable(q.lastError().text()) << endl;
return -1;
}
QSqlRecord rec = q.record();
cout << rec.count() << endl;
while (q.next())
{
qDebug() << q.value(0).toString();
}@Connecting to db and the query don't report any errors.
But the query values (data) are printed only in Windows - q.value(0).toString(), on Mac not...
rec-count = 77 in both OS.I'm using Qt 4.8.0 x64 (win 7 x64, osx 10.6 x64).
Thanks for help.Martin
-
https://bugreports.qt-project.org/browse/QTBUG-25260
I have found walkaround for this issue (see bug description).