Killsoft Sugdok


Join the forum, it's quick and easy

Killsoft Sugdok
Killsoft Sugdok
Would you like to react to this message? Create an account in a few clicks or log in to continue.

how to update record in ms access using vb.net

2 posters

Go down

how to update record in ms access using vb.net Empty how to update record in ms access using vb.net

Post by putayputay Mon Mar 11, 2013 6:53 am

Try
Dim SqlQuery As String = "UPDATE FullNameTable SET FirstName = '" & txtFName.Text & "', MiddleName = '" & txtMName.Text & "', LastName = '" & txtLName.Text & "' WHERE ID = " & id & ";"
Dim SqlCommand As New OleDbCommand

With SqlCommand
.CommandText = SqlQuery
.Connection = conn
.ExecuteNonQuery()
End With
MsgBox("One record successfully updated.")
loadListView()
Catch ex As Exception
MsgBox(ex.Message)
End Try

putayputay
Newbie
Newbie

Posts : 10
Join date : 2013-03-09

Back to top Go down

how to update record in ms access using vb.net Empty Re: how to update record in ms access using vb.net

Post by giovhz Tue Mar 19, 2013 9:02 am

putayputay wrote:Try
Dim SqlQuery As String = "UPDATE FullNameTable SET FirstName = '" & txtFName.Text & "', MiddleName = '" & txtMName.Text & "', LastName = '" & txtLName.Text & "' WHERE ID = " & id & ";"
Dim SqlCommand As New OleDbCommand

With SqlCommand
.CommandText = SqlQuery
.Connection = conn
.ExecuteNonQuery()
End With
MsgBox("One record successfully updated.")
loadListView()
Catch ex As Exception
MsgBox(ex.Message)
End Try

nice share
giovhz
giovhz
Newbie
Newbie

Posts : 41
Join date : 2013-03-09

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum