Skip to content
Permalink
Browse files

mssql provider: make mapping of import fields case-insensitive

  • Loading branch information
jef-n committed Jun 30, 2016
1 parent 5188a52 commit 6f7a999ebf3bdf1561cfce49e4908a23adf958b3
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/mssql/qgsmssqlprovider.cpp
@@ -1858,7 +1858,7 @@ QgsVectorLayerImport::ImportError QgsMssqlProvider::createEmptyLayer(
QgsField fld = fields[i];
if ( oldToNewAttrIdxMap && fld.name() == primaryKey )
{
oldToNewAttrIdxMap->insert( fields.indexFromName( fld.name() ), 0 );
oldToNewAttrIdxMap->insert( fields.fieldNameIndex( fld.name() ), 0 );
continue;
}

@@ -1879,7 +1879,7 @@ QgsVectorLayerImport::ImportError QgsMssqlProvider::createEmptyLayer(

flist.append( fld );
if ( oldToNewAttrIdxMap )
oldToNewAttrIdxMap->insert( fields.indexFromName( fld.name() ), offset++ );
oldToNewAttrIdxMap->insert( fields.fieldNameIndex( fld.name() ), offset++ );
}

if ( !provider->addAttributes( flist ) )

0 comments on commit 6f7a999

Please sign in to comment.
You can’t perform that action at this time.