Helo every one
i m trying to update record to ms database using vb.net. but i m getting error message. pls help me where i made mistake. here is my code.

Dim da As New OleDb.OleDbDataAdapter("SELECT * From tblCustomer", strPath)
                Dim cb As New OleDb.OleDbCommandBuilder(da)
                Dim ds As New DataSet

                ds.Tables("DBGetLoan2000").Rows(position).Item(1) = txtFName.Text
                ds.Tables("DBGetLoan2000").Rows(position).Item(2) = txtLName.Text

                da.Update(ds, "DBGetLoan2000")


                MsgBox("Record updated")

thank you

Recommended Answers

All 3 Replies

emint,
Fill the dataset.

...
 Dim cb As New OleDb.OleDbCommandBuilder(da)
 Dim ds As New DataSet
 ds.Fill(ds,"DBGetLoan2000")
 ...

helo adatapost
thank you for ur reply, it works fine, thank you

Thanks emint.
Mark this thread as "Solved" if you get solution.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.