ColumnMappings screw up FillSchema?

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
 
B

Brian Newtz

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top