hello,
I am using VB.NEt 2005 and iam unable to update MS Access. here is the code ,
I am able to update the dataset but not see the changes in dbase.
the code wriiten in the form_load is,
Can anyone helpme out....
I am using VB.NEt 2005 and iam unable to update MS Access. here is the code ,
VB.NET:
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Dim cb As New OleDb.OleDbCommandBuilder(da)
ds.Tables("Details").Rows(inc).Item(0) = IDTxt.Text
ds.Tables("Details").Rows(inc).Item(1) = NameTxt.Text
ds.AcceptChanges()
da.Update(ds, "Details")
MsgBox("data updated")
I am able to update the dataset but not see the changes in dbase.
the code wriiten in the form_load is,
VB.NET:
Str = "Provider= Microsoft.Jet.OLEDB.4.0;"
str &= "Data Source=C:\MutualFund1.mdb;"
strconn = New OleDbConnection(Str)
da = New OleDbDataAdapter("select * from Details ", str)
Try
da.Fill(ds, "Details")
Catch ex As Exception
MsgBox("No results Found")
End Try
MaxRows = ds.Tables("Details").Rows.Count
inc = -1
Last edited by a moderator: