C# dataset to database column types

W

Wes

I have a dataset populated from a spreadsheet with 4 columns and I want to fill the dataAdapter for the database that also has 4 columns, but the data types are different. One column holds an INT(32) and I'm trying to put that into the column and holds a string.

The question I have is how do I change the dataytpe in the dataset to the datatype in the database?

From http://developmentnow.com/g/7_2004_5_0_3_0/dotnet-framework-adonet.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
 
J

jmbledsoe

Is your Fill operation creating the table on the fly, or are you
creating the table structure (by making a typed dataset, or manually)
and then filling it? If you're pre-creating the structure, you just
create a column of type string, and it should fill fine. Updates
should work fine as well, unless you stuff non-numeric data in your
string column.

Hope that helps.

John B.
http://johnsbraindump.blogspot.com
 

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