sql - c# insert query executed successfully but data is not inserted in MS access databse -


i have 1 form having revise button update existing data in database. insert query executed data not inserted

this code use:

private void btnupdate_click(object sender, eventargs e)     {         try         {             int row = datagridview1.rowcount;             (int = 0; < row - 1; i++)             {                 string str = "insert jds_data(e_jds_id,e_jds_revision,designspec,engine_type,record_date,cph_designer,exp_del_week,rev_description,name_of_mock_up,epc_drawing,turbocharger_no_type,engine_specific_requirement,description_of_job,sf_no,standard,task_no,sf_revision,part_family,action_code,remark,modified_date,username) values('" + txtjobno.text + "','" + combobox1.selecteditem + "','" + txtds.text + "','" + txtenginetype.text + "','" + datetimepicker1.text + "','" + txtcphdesigner.text + "','" + txtexpweek.text + "','" + txtrevdescription.text + "','" + txtmockup.text + "','" + txtepcdwg.text + "','" + txtturbono.text + "','" + txtenginereq.text + "','" + txtdespjob.text + "','" + datagridview1.rows[i].cells[0].value.tostring() + "','" + datagridview1.rows[i].cells[1].value.tostring() + "','" + datagridview1.rows[i].cells[2].value.tostring() + "','" + datagridview1.rows[i].cells[3].value.tostring() + "','" + datagridview1.rows[i].cells[4].value.tostring() + "','" + datagridview1.rows[i].cells[5].value.tostring() + "','" + datagridview1.rows[i].cells[6].value.tostring() + "','" + datetime.today.tostring("dd-mm-yyyy") + "','" + mdlconnection.user_name + "')";                 int dd = mdlconnection.excutequery(str);              }               messagebox.show("data revised successfully..!!!");            }         catch (exception e2)         {             messagebox.show("" + e2.message);         }           int rw = datagridview2.rowcount;         (int = 0; < rw - 1; i++)         {             string str = "insert jds_files(e_jds_id,sf_no,path,filename) values('" + txtjobno.text + "','" + datagridview2.rows[i].cells[0].value.tostring() + "','" + datagridview2.rows[i].cells[1].value.tostring() + "','" + datagridview2.rows[i].cells[2].value.tostring() + "')";             int dd = mdlconnection.excutequery(str);         }         btnupdate.enabled = false;     } 


Comments