Okay, so why aren't any of those useful to you? There's a few different examples there showing you how updating a dataset can be done.
Have you tried anything so far? If so print your code here and I'll take a look.
Dr B
this code for adding records through dataset
-
-
Dim da As New SqlDataAdapter("select * from calc_limit_config", con)
-
con.Open()
-
da.Fill(ds, "calc_limit_config")
-
con.Close()
-
-
Dim drnew As Data.DataRow
-
drnew = ds.Tables("calc_limit_config").NewRow
-
With drnew
-
.Item("param") = TextBox1.Text
-
.Item("alarm") = TextBox2.Text
-
.Item("limit") = TextBox3.Text
-
-
End With
-
ds.Tables(0).Rows.Add(drnew)
-
its working fine.then i can update this new records with database
- Dim cb As New SqlCommandBuilder(da)
-
da.UpdateCommand = cb.GetUpdateCommand()
-
-
da.Update(ds, "calc_limit_config")
-
then i want edit(or)update that particular new records
-
-
drnew = ds.Tables("calc_limit_config").Select("param = '1')
-
-
drnew(0)("alarm") =textbox2.text
-
drnew(0)("limit") =textbox3.text
-
here the error is
value of type 1-dimentional array of system.data.datarow cannot be converted to system.data.datarow