Skip to content
Permalink
Browse files

oracle provider: fix evaluation of default values

  • Loading branch information
jef-n committed Dec 17, 2014
1 parent 33b757e commit 64a6cf631e48df9c4f1104c9418522fe09df6814
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/oracle/qgsoracleprovider.cpp
@@ -1139,7 +1139,7 @@ QString QgsOracleProvider::paramValue( QString fieldValue, const QString &defaul
else if ( fieldValue == defaultValue && !defaultValue.isNull() )
{
QSqlQuery qry( *mConnection );
if ( !exec( qry, QString( "SELECT %1" ).arg( defaultValue ) ) || !qry.next() )
if ( !exec( qry, QString( "SELECT %1 FROM dual" ).arg( defaultValue ) ) || !qry.next() )
{
throw OracleException( tr( "Evaluation of default value failed" ), qry );
}

0 comments on commit 64a6cf6

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