私は次のコードを使用しています:
SqlDataSource1.InsertCommand = "insert into tblCaller with (ROWLOCK) (CallerID,Name,Surname,Home_Tel,Work_Tel,Cellphone,Relation_Type,Relationship) values ('" & txtEnqNo.Text & "','" & txtName.Text & "','" & txtSurname.Text & "','" & txtHome.Text & " ','" & txtWork.Text & "','" & txtCell.Text & " ','" & RTypeDropDownList.SelectedValue & "','" & txtRelationshp.Text & "')"
SqlDataSource1.Insert()
SqlDataSource2.InsertCommand = "insert into tblBeneficiary with (ROWLOCK) (Ben_ID,CallerID,Name,Surname,Contact_No,Res_Address) values ('" & txtBenID.Text & "','" & txtEnqNo.Text & "','" & txtBenName.Text & " ','" & txtBenSurname.Text & "','" & txtContNo.Text & "','" & DropDownList17.SelectedValue & "')"
SqlDataSource2.Insert()
SqlDataSource3.InsertCommand = "insert into tblIncident with (ROWLOCK) (Incident_No,CallerID,Reg_Code,District,Local_Office,Municipality,Ward,Access_Type,Enquiry_Type,Grant_Type,Summary,Detailed,Priority,Log_Date,Status,Resolution,Resol_Date,Capturer,Assigned_To) values ('" & txtIncident.Text & "','" & txtEnqNo.Text & "','" & lblRegion.Text & " ','" & DropDownList5.SelectedItem.Text & "','" & DropDownList6.SelectedItem.Text & " ','" & txtMunicipal.Text & " ','" & txtWard.Text & "','" & AccessRadioButtonList.SelectedValue & "', '" & EnquiryRadioButtonList.SelectedValue & "','" & GrantRadioButtonList.SelectedValue & "','" & DropDownList1.SelectedValue & "','" & txtDetailed.Text & "','" & PriorityRadioButtonList.SelectedValue & "','" & txtDlog.Text & "','" & DropDownList16.SelectedValue & "',' " & txtResolution.Text & "','" & txtDResol.Text & "','" & GridView4.Rows(0).Cells(0).Text & "','" & DropDownList15.SelectedValue & "')"
SqlDataSource3.Insert()
SqlDataSource4.InsertCommand = "insert into tblHistory with (ROWLOCK) (Incident_No,Status,Resolution,Last_updated,Log_date,Capturer,Assigned_to,Updater) values ('" & txtIncident.Text & "','" & DropDownList1.SelectedValue & "','" & txtResolution.Text & "','" & txtDlog.Text & "','" & txtDlog.Text & "','" & GridView4.Rows(0).Cells(0).Text & "','" & DropDownList15.SelectedValue & "','" & GridView4.Rows(0).Cells(0).Text & "')"
SqlDataSource4.Insert()