Insert records from Excel

Discussion in 'ASP .Net' started by =?Utf-8?B?TWFyZHk=?=, Oct 30, 2005.

  1. 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
    =?Utf-8?B?TWFyZHk=?=, Oct 30, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?TWFyZHk=?=

    john_teague Guest

    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.
    john_teague, Oct 30, 2005
    #2
    1. Advertising

  3. =?Utf-8?B?TWFyZHk=?=

    john_teague Guest

    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.
    john_teague, Oct 30, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luke Airig
    Replies:
    0
    Views:
    787
    Luke Airig
    Dec 31, 2003
  2. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,498
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  3. Replies:
    1
    Views:
    1,779
    Albert Hopkins
    Dec 6, 2008
  4. Dan

    Delete records or update records

    Dan, May 10, 2004, in forum: ASP General
    Replies:
    1
    Views:
    461
    Ray at
    May 10, 2004
  5. Replies:
    3
    Views:
    653
    Anthony Jones
    Nov 2, 2006
Loading...

Share This Page