Hi all,
I’m new to ASP.NET and I am trying to get it to update an access database. The problem I am having is that whenever I try to pass the following SQL I get the error “Syntax error in UPDATE statement”. Can anyone see what would cause this?
code:
Sub submit(sender As Object, e As System.EventArgs)
Dim MyConnection As OleDbConnection
MyConnection = New OleDbConnection(“PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=” & server.mappath(“internal.mdb”) & “;”)
Dim MyCommand As OleDbCommand
Dim UpdateCmd As String = “UPDATE login SET password = ‘Hello'”
MyCommand = New OleDbCommand(UpdateCmd, MyConnection)
MyCommand.Connection.Open()
MyCommand.ExecuteNonQuery()
MyCommand.Connection.Close()
End Sub