Skip to content

Commit

Permalink
[MSSQL] Use schema name when getting columns
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed May 19, 2014
1 parent f283040 commit ff7a47d
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 @@ -353,7 +353,7 @@ void QgsMssqlProvider::loadFields()
// get field spec
QSqlQuery query = QSqlQuery( mDatabase );
query.setForwardOnly( true );
if ( !query.exec( QString( "exec sp_columns N'%1', NULL, NULL, NULL, NULL" ).arg( mTableName ) ) )
if ( !query.exec( QString( "exec sp_columns @table_name = N'%1', @table_owner = '%2'" ).arg( mTableName, mSchemaName ) ) )
{
QString msg = query.lastError().text();
QgsDebugMsg( msg );
Expand Down

0 comments on commit ff7a47d

Please sign in to comment.