Details
-
Type:
Bug
-
Status: Reported
-
Priority:
P2: Important
-
Resolution: Unresolved
-
Affects Version/s: 5.15.6
-
Fix Version/s: None
-
Component/s: SQL Support
-
Labels:None
-
Environment:ODBC with IBM i Access ODBC Driver - Windows
-
Platform/s:
Description
In the QODBCDriverPrivate::checkUnicode() method, the query QLatin1String("select 'test'")) attempts to determine whether the database supports Unicode.
SELECT without FROM is not standard-compliant. DB2 and Oracle do not allow a query without FROM.
Possible solution:
At least DB2 supports the values('test') statement.
Possible solution (but not the nicest):
r = SQLExecDirect(hStmt, toSQLTCHAR(QLatin1String("select 'test'")).data(), SQL_NTS); if(r != SQL_SUCCESS) r = SQLExecDirect(hStmt, toSQLTCHAR(QLatin1String("values('test')").data(), SQL_NTS);