Skip to content

Commit

Permalink
oracle provider: fix evaluation of default values
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Dec 17, 2014
1 parent 33b757e commit 64a6cf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/oracle/qgsoracleprovider.cpp
Expand Up @@ -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 );
}
Expand Down

0 comments on commit 64a6cf6

Please sign in to comment.