ColumnMappings screw up FillSchema?

  • Thread starter Thread starter Brian Newtz
  • Start date Start date
B

Brian Newtz

This is frustrating the heck out of me...

I have an OleDbConnection, DataAdapter, and DataSet and I
want to want to map some columns before I fill the schema
of the datatable. For example:

.... do all the initial stuff like set up connection,
instantiate the dataadapter, etc...

access_da.TableMappings.Add("Table", "AccessTransfer");
access_da.TableMappings[0].ColumnMappings.Add
("oldName", "newName");

access_da.FillSchema(access_ds.Tables[0],
SchemaType.Mapped);

What happens is that even if the source column
("oldName") is of a type other than a string of some
sort, the mapped column ("newName") ends up with a
DataType of System.String.

If I don't add the columnmapping and just call
FillSchema, the column gets the correct DataType.

This is pretty retarded if a ColumnMapping throws away
the DataType... does anyone know what's going on?

Thanks in advance,
-Brian
 
I'm bumping this because someone here should know this
answer, and in any case, if I'm not doing anything wrong,
then the behavior I've described seems to be a bug.
 
Back
Top