Skip to content
Permalink
Browse files

mssql provider: make mapping of import fields case-insensitive

(cherry picked from commit 6f7a999)
  • Loading branch information
jef-n committed Jun 30, 2016
1 parent 46d4042 commit a3dfd9d934b757418500253847fb36d75589d574
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/mssql/qgsmssqlprovider.cpp
@@ -1851,7 +1851,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;
}

@@ -1872,7 +1872,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 a3dfd9d

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