Problems with QSqlDatabase::setConnectOptions
-
Hi. Basically I've build an application that connect's whith a Firebird Database from another software. This database charset is set to "NONE". On Linux, I've connected with QIBASE driver using:
db = QSqlDatabase::addDatabase("QIBASE"); db.setHostName("xxx.xxx.xxx.xxx"); db.setConnectOptions("ISC_DPB_LC_CTYPE=Latin1"); db.setPort(xxxx); db.setDatabaseName("C:/SGH.GDB"); db.setUserName("SYSDBA"); db.setPassword("masterkey");But on Windows, I'm using QODBC3 so I don't need to compile Qt myself with the IBASE driver. The problem is on Windows, some characters are not displaying. On Linux was the same, but db.setConnectOptions("ISC_DPB_LC_CTYPE=Latin1") solved my problem.
I'm using on Windows exactly this:
db = QSqlDatabase::addDatabase("QODBC3"); db.setHostName("localhost"); db.setConnectOptions("ISC_DPB_LC_CTYPE=Latin1"); db.setDatabaseName("SGH");But seems that setConnectOptions has no effect and I can't see the characters there are not displayed. Anyone can help me?
-
Ok. So I discovered that the option ISC_DPB_LC_CTYPE is not available for QODBC and decided to build the QIBASE plugin. I've run qmake with the correct params and mingw32-make after. Everything compiles normal, but QT don't show the driver in the list of available drivers. There's something else that I should do?
-
Hi and welcome to devnet,
Might be a silly question but: did you install the plugin ?