0

How to send datatable as a parameter to mysql store procedure through asp.net code. if any solution is there, can anyone please tell me. Its urgent

thank you,

siva
  • 111
  • 1
  • 1
  • 5

2 Answers2

0

You could write it to a .csv and use LOAD DATA INFILE
- LOAD DATA INFILE Syntax

Else you you have to loop through the datatable and insert one by one row.

References

  1. Best way to Bulk Insert from a C# DataTable
Community
  • 1
  • 1
शेखर
  • 17,412
  • 13
  • 61
  • 117
0

I would parse the data set and for each data row call a stored procedure passing parameters for one data row. If you don't want that, then there are other import facilities (bulk import) like http://brockangelo.com/2009/04/27/how-to-bulk-import-into-a-mysql-database or MySQL bulk insert from CSV data files.

Community
  • 1
  • 1
L-Four
  • 13,345
  • 9
  • 65
  • 109
  • hi, can we send datatable as a parameter to mysql storeprocedure, if possible can you please tell me how to do this – siva Apr 17 '13 at 09:00