Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. MacOS ODBC issue
Forum Updated to NodeBB v4.3 + New Features

MacOS ODBC issue

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rivierakid
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rivierakid
      wrote on last edited by
      #2

      https://bugreports.qt-project.org/browse/QTBUG-25260
      I have found walkaround for this issue (see bug description).

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved