Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.10.1
-
None
Description
QSqlTableModel return error when update existing record.
In qsqldriver.cpp at line 509 (after case WhereStatement used escaped table name:
prepareIdentifier(tableName, QSqlDriver::TableName, this)
while in other places in qsqldriver.cpp tableName used 'clean' as it should be.
QSqlDriver::sqlStatement SHOULD NOT escape table name. Developer must use properly table name (in double quotes if need) when setTable for QSqlTableModel. It has sense in cross-database applications.
Common practice is not use double quotes when write SQL statements (or scripts), so select * from table1 is equal select * from "TABLE1" in Oracle and select * from "table1" in PostgreSQL.
Everything worked fine in version 5.5.0
I think it is associated with QTBUG-9399 which is absolutely wrong
Attachments
Issue Links
- relates to
-
QTBUG-9399 QSqlDriver::sqlStatement does not escape table name
- Closed