PDA

View Full Version : Question regarding the SQL drivers



Wurgl
5th February 2014, 09:21
Hello!

When I call the static method QSqlDatabase::drivers() (Qt 4.8.4 which comes with Suse 12.3), then I get the following strings:

QSQLITE
QSQLITE3
QMYSQL3
QMYSQL
QODBC3
QODBC
QPSQL7
QPSQL


Fine, now I want to know what String is the one I need, so I look at the documentation:
https://qt-project.org/doc/qt-4.8/qsqldatabase.html#QSqlDatabase-3

QDB2 IBM DB2
QIBASE Borland InterBase Driver
QMYSQL MySQL Driver
QOCI Oracle Call Interface Driver
QODBC ODBC Driver (includes Microsoft SQL Server)
QPSQL PostgreSQL Driver
QSQLITE SQLite version 3 or above
QSQLITE2 SQLite version 2
QTDS Sybase Adaptive Server


And here my problem starts. The documentation tells me, that there is a pair QSQLITE and QSQLITE2, but the installed package knows about QSQLITE and QSQLITE3. Similar with QMYSQL vs. QMYSQL3 and QMYSQL, same story with QPSQL in the documentation vs. QPSQL7 and QPSQL and and also QODBC vs. QODBC3 plus QODBC.

Are these differences caused by a Suse specific patch, or is that difference just a glitch in the documentation?

I did take a look at the documentation of Qt 5, and did not find anything about these "undocumented" strings. And of course in the local installed documentation which is part of the Suse distribution, there is no reference too?

Any idea what QMYSQL3, QODBC3 or QSQLITE3 is? And what is the difference between QPSQL7 and QPSQL?

Thanks