Skip to content
Permalink
Browse files
[MSSQL] Use schema name when getting columns
  • Loading branch information
NathanW2 committed May 19, 2014
1 parent f283040 commit ff7a47d96818447ad522215fb47b7f9e86fbb27f
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/mssql/qgsmssqlprovider.cpp
@@ -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 );

0 comments on commit ff7a47d

Please sign in to comment.