OpenOffice Base connection



  • I am trying to connect to an OpenOffice Base database. I can successfully connect to an Access database. But when I try an OpenOffice, I get "[Microsoft][ODBC Driver Manager] Data source name too long QODBC3: Unable to connect"

    The configurationSetup.returnBITLogDatabase() is a method call that returns the stored name of the database the user wants to access. In this case it is: C:\Data\BITLogDatabase\BITLogDatabase.odb

    @
    QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
    db.setDatabaseName(configurationSetup.returnBITLogDatabase());

    // db.setUserName("mojito");
    // db.setPassword("J0a1m8");

        if (db.open())
        {
            qDebug() << configurationSetup.returnBITLogDatabase() << " database successfully opened.";
            msgBox.setText("decodeLRUBITLog database successfully opened.");
            msgBox.exec&#40;&#41;;
        }
        else
        {
            qDebug() << configurationSetup.returnBITLogDatabase() << " database was NOT successfully opened. ";
            qDebug() << db.lastError().text();
            msgBox.setText(configurationSetup.returnBITLogDatabase() + " database NOT opened. " + db.lastError().text());
            msgBox.exec&#40;&#41;;
        }
    

    @


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.