Post again: Why the source database not updated?

C

CM

Hi there:
Following is the code, after change the Dataset, accepte the change made to
the dataset and excute the update of Adapter, nothing happened to the
database source database, what's wrong?
Thanks!
CM

-------------------------------------------------
Private Sub UpdateApartment()
Dim i As Integer
Dim myDataAdapter As OleDbDataAdapter
Dim myDataset As DataSet
Dim MyConnection As OleDbConnection

i = Session("intIndex")
myDataset = Session("tableApt")
myDataAdapter = Session("myAdapter")
MyConnection = Session("ADMConn")
With myDataset.Tables("Apt")
.Rows(i)("Company") = txtCompanyName.Text
.Rows(i)("BuildingName") = txtBuildingName.Text
End With

myDataset.AcceptChanges()
MyConnection.Open()
myDataAdapter.Update(myDataset. "Apt")
MyConnection.Close()

End Sub
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top