Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Insert records from Excel

Reply
Thread Tools

Insert records from Excel

 
 
=?Utf-8?B?TWFyZHk=?=
Guest
Posts: n/a
 
      10-30-2005
Hello

I'm working on code to upload an Excel file, read the spreadsheet contents
into a datagrid, then ultimately insert each row into a sql server database.

Currently I have the file upload and datagrid functionality working. I'm now
trying to determine the best way to get the data from the dataset that
populates the datagrid into sql server.

I know that there is a dts option but would like to do this without using
dts.

I'm guessing that there is a way to loop through the datagrid and build a
string for an insert statement but am wondering if it would be possible to
use the existing dataset and associated table and a second adapter to the db
to complete the upload.???

Thanks
 
Reply With Quote
 
 
 
 
john_teague
Guest
Posts: n/a
 
      10-30-2005
I think the standard way would be to use a DataSet for the datasource
and then a data adapter that has all of the insert/update/delete
methods defined for it and use the data adapter to insert new rows
added to the dataset.

 
Reply With Quote
 
 
 
 
john_teague
Guest
Posts: n/a
 
      10-30-2005
I think the standard way would be to use a DataSet for the datasource
and then a data adapter that has all of the insert/update/delete
methods defined for it and use the data adapter to insert new rows
added to the dataset.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Multiple Records Using One Insert Statemen with MySQLdb module anton.ranieri.it@gmail.com Python 1 12-06-2008 12:47 PM
Problem with Excel reports ::::Excel 2003 Migration To Excel 2007 =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?= ASP .Net 15 10-24-2007 01:34 PM
Simple query returns 0 records in asp, but all records in vbscript masg0013@gmail.com ASP General 3 11-02-2006 09:23 AM
Delete records or update records Dan ASP General 1 05-10-2004 01:25 PM
match muliple header records to associated detail records Luke Airig XML 0 12-31-2003 12:06 AM



Advertisments