i m new to vb.net please help me to update the database records through vb.net
How to update data in MS-Access through vb.net
Collapse
X
-
hello
Code:oledbdataadapter1.selectcommand.comandtext="Update () from tabel1 where Rec_number=value('" & textbox1.text &"')
-
selectcommand is a built-in method in the .net framework.
Alternatively, what you can do is the following:
Code:Public Sub updateUsers() Dim updateQuery As String = ("UPDATE Users SET UserName = " _ + (txtUserName.Text.Trim + " WHERE UserID = 1")) Dim adapter As System.Data.OleDb.OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter adapter.SelectCommand.CommandText = updateQuery End Sub
Comment
Comment