mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
Use forward only cursor in all queries
This commit is contained in:
parent
f07b3f9189
commit
f375e351f3
@ -354,6 +354,7 @@ void QgsMssqlProvider::loadFields()
|
||||
if ( mFidColName.isEmpty() )
|
||||
{
|
||||
mQuery.clear();
|
||||
mQuery.setForwardOnly( true );
|
||||
if (!mQuery.exec( QString( "exec sp_pkeys N'%1', NULL, NULL" ).arg( mTableName ) ))
|
||||
{
|
||||
QString msg = mQuery.lastError().text();
|
||||
@ -370,6 +371,7 @@ void QgsMssqlProvider::loadFields()
|
||||
foreach( QString pk, pkCandidates )
|
||||
{
|
||||
mQuery.clear();
|
||||
mQuery.setForwardOnly( true );
|
||||
if (!mQuery.exec( QString( "select count(distinct [%1]), count([%1]) from [%2].[%3]" )
|
||||
.arg( pk )
|
||||
.arg( mSchemaName )
|
||||
|
Loading…
x
Reference in New Issue
Block a user