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)
MyConnection.Close()
End Sub
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)
MyConnection.Close()
End Sub