hi i tried to add and delete a record but i always get an error in my Dataadapter it's something like error in system....dll.
here is the code i typed
if anyone could help thanks in advance
the sqlcommand is
sqlcommand.commandtext="Select * from Hardware"
VB Code:
intteller = 0 If intteller <> -1 Then Dim nieuweRij As DataRow Dim mijntabel As New DataTable mijntabel = beheerdersDataset.Tables(0) nieuweRij = beheerdersDataset.Tables(0).NewRow() nieuweRij.Item("Nr") = txtnr.Text nieuweRij.Item("Voornaam") = txtvoornaam.Text nieuweRij.Item("Achternaam") = txtachternaam.Text nieuweRij.Item("E-mail") = txtemail.Text nieuweRij.Item("GSM") = txtgsm.Text beheerdersDataset.Tables(0).Rows.Add(nieuweRij) ' ' here is get my error in the next line mijnAdapter.Update(beheerdersDataset) MsgBox("New Record added to the Database") End If 'delete hardwareDataset.Tables(0).Rows(intteller).Delete() aantalrec = aantalrec - 1 intteller = 0 Navigatierecords() ' here is get my error in the next line mijnAdapter.Update(hardwareDataset)




Reply With Quote