yesubabu k

yesubabu k

  • 1.1k
  • 644
  • 63.6k

inserting excel rows to database through gridview

Nov 25 2016 5:39 AM
Sir,
I am facing a problem with inserting
i hevea excel file wth 5 columns so those 5 are save in to my  database in windows application 
 
 
 
 
DataTable dt = dbFunctions.getTable("pr_Upload_AMC_Details '" + dataGridView1.Rows[i].Cells[1].Value.ToString() + "',''" + dataGridView1.Rows[i].Cells[2].Value.ToString() + "'',''" + dataGridView1.Rows[i].Cells[3].Value.ToString() + "'','" + DateTime.Parse(dataGridView1.Rows[i].Cells[4].Value.ToString()).ToString("dd-MMM-yyyy") + "',''" + DateTime.Parse(dataGridView1.Rows[i].Cells[5].Value.ToString()).ToString("dd-MMM-yyyy") + "'','" + dataGridView1.Rows[i].Cells[6].Value.ToString() + "'");

Answers (2)