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.....
 
DataAdapter.Update. The DataAdapter Wizard can build all of this for you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top