Connecting Qt5 and Firebird 2.5

I am new to C ++ connection and databases, so maybe I am asking a really stupid question. Anyway, I'm trying to access the firebird database using Qt5 for Windows. I checked Google and found two ways to do this:

  • Build an ibase driver from a Qt source
  • use firebird through the ODBC driver.

Software version

I am using the latest version of Qt: 5.1.1. Firebird 2.5 works fine: I created test_baseand tested a user admin. test_baseI made Administartion through FlameRobin.

Building

I downloaded the qt5.1.1 source and unpacked it in c: /devtools/qt5.1.1-src. Since the folder and structure of the Qt4.7-4.8 project have been changed, so the old frequently asked questions cannot be applied here. So I tried to create sql.pro from the qtbase \ src \ sql folder with two lines added:

INCLUDEPATH + = C: / devtools / firebird / firebird_2_5 / include

LIBS + = C: /devtools/firebird/firebird_2_5/lib/fbclient_ms.lib

And I added C: / devtools / firebird / firebird_2_5 / lib / and C: / devtools / firebird / firebird_2_5 / to include PATH in the system. Compilation runs without errors, and I get the file qt_pch.h.gch\c++in the dir directory. And I have no idea what to do next, because I was hoping to have a bunch of .a and .dll files, or a bunch of errors at least.

Using the ODBC Driver

ODBC Firebird . , ODBC DSN mydb Windows ODBC. ODBC , .

, , - SQL Browser Qt Creator. ODBC :

  • : QODBC
  • : mydb
  • : admin
  • : admin
  • : localhost
  • :

: "[ Firebird ODBC] : " C:\devtools\Firebird\Firebird_2_5\bin\fbclient.dll " QODBC3: ".

. .

upd: firebird ODBC: x64 x86 QODBC. Nota bene: x86 DSN ODBC x64 Windows 7 ODBC %WINDIR%\SysWOW64\odbcad32.exe , .

ibase qt?

+4

All Articles