Skip to content

Commit 64a6cf6

Browse files
committed
oracle provider: fix evaluation of default values
1 parent 33b757e commit 64a6cf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/oracle/qgsoracleprovider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ QString QgsOracleProvider::paramValue( QString fieldValue, const QString &defaul
11391139
else if ( fieldValue == defaultValue && !defaultValue.isNull() )
11401140
{
11411141
QSqlQuery qry( *mConnection );
1142-
if ( !exec( qry, QString( "SELECT %1" ).arg( defaultValue ) ) || !qry.next() )
1142+
if ( !exec( qry, QString( "SELECT %1 FROM dual" ).arg( defaultValue ) ) || !qry.next() )
11431143
{
11441144
throw OracleException( tr( "Evaluation of default value failed" ), qry );
11451145
}

0 commit comments

Comments
 (0)