Best way to submit each row of a DataTable into each tables in sql database RRS feed

  • Question

  • User2015884762 posted


    I have a got a datatable generated from an Excel sheet. The datatable is then displayed in a gridview. Now I have a choice of inserting data from the datatable or the gridview to the sql database. For each row, there a destination table in the database. What is the best way of achieving this feature. Appreciate any feedback, thanks. 

    Monday, March 8, 2021 6:18 PM


  • User1535942433 posted

    Hi callykalpana,

    As far as I think,your solution is this:

    1.When you got the data from an Excel sheet, you could create a new column to define special datatables. You could check which row go to  which databales.

    2.When you insert data from datatables,you could to write the different sql database routes or tablename.

    3.The data you need to insert the same database,you could traverse these data.

    Best regards,

    Yijing Sun

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 9, 2021 4:11 AM