Skip to content
Permalink
Browse files
[MSSQL] Use schema for key lookup
  • Loading branch information
NathanW2 committed May 19, 2014
1 parent ad89ae7 commit bdf857ae878b8100d84cba90643b35e9a59c057a
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/mssql/qgsmssqlprovider.cpp
@@ -418,7 +418,7 @@ void QgsMssqlProvider::loadFields()
{
query.clear();
query.setForwardOnly( true );
if ( !query.exec( QString( "exec sp_pkeys N'%1', NULL, NULL" ).arg( mTableName ) ) )
if ( !query.exec( QString( "exec sp_pkeys @table_name = N'%1', @table_owner = '%2' " ).arg( mTableName, mSchemaName ) ) )
{
QString msg = query.lastError().text();
QgsDebugMsg( msg );

0 comments on commit bdf857a

Please sign in to comment.