DanilGholtsman
DanilGholtsman

Reputation: 2374

QIBASE built but not found

I followed this instruction. I used Qt version 4.7.4, firebird 2.1.5, VisualStudio 2010 Pro.

.dlls (qsqlibase4 and qsqlite4) and stuff appear where they should, at %QtPATH%\plugins\sqldrivers.

enter image description here

But when I run my simple test project

#include <QApplication>
#include <QtGui>
#include <QtSql>

int main(int argc, char** argv)
{
    QApplication app(argc, argv);
    QComboBox myCombo;


    QSqlDatabase db = QSqlDatabase::addDatabase("QIBASE");
    myCombo.addItems(db.drivers());
    db.setDatabaseName("c:/databases/employee.fdb");
    db.setUserName("SYSDBA");
    db.setPassword("masterkey");

    if(!db.open())
    {
        QSqlError er = db.lastError();
        QMessageBox::information(0, "Error", er.text());
    }

    myCombo.show();
    return app.exec();
}

I get an error:

QSqlDatabase: QIBASE driver not loaded 
QSqlDatabase: available drivers: QSQLITE

I am really confused. Drivers are built and it looks like paths are right, but then why this doesn't work?

Upvotes: 1

Views: 1020

Answers (1)

DanilGholtsman
DanilGholtsman

Reputation: 2374

Well, it's kinda strange but it helped me! I just made a copy of file fbclient.dll from this dir Firebird_2_1\bin and just pasted it in dir with my project.exe win32/Debug. So now QIBASE is visible!

Upvotes: 1

Related Questions