Saving dataset?

  • Thread starter Thread starter Able
  • Start date Start date
A

Able

Dear friends

I have connected to an Access 2000 database and has retrieved a dataset from
the table "tblPersons". Adding a new row to the dataset is done as this:

Dim dr As DataRow
dr = ds.Tables(0).NewRow()

dr.Item("PersonID") = "some value"

dr.Item("Name") = "some value"

ds.Tables(0).Rows.Add(dr)

Me.BindingContext(ds, "tblPersons").Position = Me.BindingContext(ds,
"tblPersons").Count - 1

But how do I save the new row to the database?

Regards Able
 
send the DataSet back to the dataadapter...... and call the update
method.... I assume that you used the WIZ..... to build your commands....
(as that is where most folks start with this stuff)..... so those commands
should already be there for you.....
 
Back
Top