Converting Untyped Dataset To Typed Dataset

H

HKM

Hello,

I'm building data loader application that uploads data from excel
files to SqlServer. I'm using OleDbReader to read excel file into
dataset and then displaying it to user for configuration purposes.

My problem is, the target schema is different from the one found in
the excel files. My first shot at this was to convert the untyped
dataset (dataset built from reading excel file) to typed dataset that
is build from the target schema (SqlServer Table). Could anybody guide
me about this.

Thanks in advance,
-HKM
 
G

Guest

Hi

If the source and target schemas are not the same, creating a typed dataset will not do you any good. Try to let Excel output the data in the correct schema (sql table). If this is not an option you can also look into DTS.

(Data Transformation Services). DTS was specifically made for these kinds of tasks. You can graphically design a data transformation between an Excel file and a db table.

The last option you might consider is transforming the incoming data to Xml and use Xslt to do the transformation and store the result in your Db table

Hope it helps
Grt
Marc Jacobi
 

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