1
Vote

Cannot Import Shapefile due to duplicate column name

description

How do i get around of this error? (I really dont care about names as long as it would import the file)
 
Unhandled Exception: System.Data.DuplicateNameException: A column named 'ID' alr
eady belongs to this DataTable.
at System.Data.DataColumnCollection.RegisterColumnName(String name, DataColum
n column, DataTable table)
at System.Data.DataColumnCollection.BaseAdd(DataColumn column)
at System.Data.DataColumnCollection.AddAt(Int32 index, DataColumn column)
at System.Data.DataColumnCollection.Add(String columnName, Type type)
at SharpMap.Data.Providers.DbaseReader.CreateBaseTable()
at SharpMap.Data.Providers.DbaseReader.ParseDbfHeader(String filename)
at SharpMap.Data.Providers.DbaseReader.Open()
at SharpMap.Data.Providers.ShapeFile.Open()
at StoredProcedures.ImportFromDatasource(IProvider datasource, String schemaN
ame, String tableName, String columnName, Int32 srid, String type, String connec
tionString, ImportFromDatasourceProcess process, Int32& importedRows, TimeSpan&
elapsedTime)
at StoredProcedures.ImportFromShapefileMain(String shapefile, String schema_n
ame, String table_name, String column_name, Int32 srid, String type, String conn
ectionString, Int32& importedRows, TimeSpan& elapsedTime)
at MsSqlSpatialConsole.Program.ImportShp(ArgParser arg, String schema, String
table, String column, Int32 srid, String type, String connectionString)
at MsSqlSpatialConsole.Program.Main(String[] args)

file attachments

comments