Skip to content

Commit

Permalink
SQL/OCI: fix QOCIDriver::formatValue()
Browse files Browse the repository at this point in the history
The switch needs to be on QSqlField::metaType() instead the internal
QSqlField::typeID() which holds the db-specific type of this field.

This amends 7b391c0.

Pick-to: 6.5 6.2
Change-Id: Id1d1791826f08adb01cc3da45bf5a66bad288046
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 55d1480)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a1c6bb8)
  • Loading branch information
chehrlic authored and Qt Cherry-pick Bot committed Feb 9, 2024
1 parent 8d1555e commit 7bdc8d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/sqldrivers/oci/qsql_oci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2684,7 +2684,7 @@ QSqlIndex QOCIDriver::primaryIndex(const QString& tablename) const

QString QOCIDriver::formatValue(const QSqlField &field, bool trimStrings) const
{
switch (field.typeID()) {
switch (field.metaType().id()) {
case QMetaType::QDateTime: {
QDateTime datetime = field.value().toDateTime();
QString datestring;
Expand Down

0 comments on commit 7bdc8d4

Please sign in to comment.