Saving dataset?

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
 
S

Steve S

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.....
 

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

Top