We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent f07b3f9 commit f375e35Copy full SHA for f375e35
src/providers/mssql/qgsmssqlprovider.cpp
@@ -354,6 +354,7 @@ void QgsMssqlProvider::loadFields()
354
if ( mFidColName.isEmpty() )
355
{
356
mQuery.clear();
357
+ mQuery.setForwardOnly( true );
358
if (!mQuery.exec( QString( "exec sp_pkeys N'%1', NULL, NULL" ).arg( mTableName ) ))
359
360
QString msg = mQuery.lastError().text();
@@ -370,6 +371,7 @@ void QgsMssqlProvider::loadFields()
370
371
foreach( QString pk, pkCandidates )
372
373
374
375
if (!mQuery.exec( QString( "select count(distinct [%1]), count([%1]) from [%2].[%3]" )
376
.arg( pk )
377
.arg( mSchemaName )
0 commit comments