Skip to content

Commit

Permalink
[MSSQL] Use schema for key lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed May 19, 2014
1 parent ad89ae7 commit bdf857a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/mssql/qgsmssqlprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit bdf857a

Please sign in to comment.