Skip to content

Commit bdf857a

Browse files
committed
[MSSQL] Use schema for key lookup
1 parent ad89ae7 commit bdf857a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/mssql/qgsmssqlprovider.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ void QgsMssqlProvider::loadFields()
418418
{
419419
query.clear();
420420
query.setForwardOnly( true );
421-
if ( !query.exec( QString( "exec sp_pkeys N'%1', NULL, NULL" ).arg( mTableName ) ) )
421+
if ( !query.exec( QString( "exec sp_pkeys @table_name = N'%1', @table_owner = '%2' " ).arg( mTableName, mSchemaName ) ) )
422422
{
423423
QString msg = query.lastError().text();
424424
QgsDebugMsg( msg );

0 commit comments

Comments
 (0)