Skip to content
Permalink
Browse files

No more QSqlError::number()

  • Loading branch information
nyalldawson committed Feb 7, 2020
1 parent 38ea5c1 commit d4f7bb902435ec1ec56c9a51a8fc3049f524cf01
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/providers/oracle/qgsoraclefeatureiterator.cpp
@@ -546,8 +546,10 @@ bool QgsOracleFeatureIterator::execQuery( const QString &query, const QVariantLi
// ORA-12170: TNS:Connect timeout occurred
// Or if there is a problem with the network connectivity try again N times
// ORA-03114: Not Connected to Oracle
if ( mQry.lastError().number() == 12170 ||
mQry.lastError().number() == 3114 )
if ( mQry.lastError().nativeErrorCode() == QLatin1String( "12170" ) ||
mQry.lastError().nativeErrorCode().compare( QLatin1String( "ORA-12170" ), Qt::CaseInsensitive ) == 0 ||
mQry.lastError().nativeErrorCode() == QLatin1String( "3114" ) ||
mQry.lastError().nativeErrorCode().compare( QLatin1String( "ORA-3114" ), Qt::CaseInsensitive ) == 0 )
{
// restart connection
mConnection->reconnect();

0 comments on commit d4f7bb9

Please sign in to comment.
You can’t perform that action at this time.