R
Rabi
I have been trying to update in Access Database. I get this error "Syntax
error in UPDATE statement." What could be the problem or can somebody
suggest different solution.
I call this function from my main page.
Public Shared Function UpdateScholarship(ByVal ID As String, ByVal Name As
String, ByVal Amount As String, ByVal Year As String, ByVal Criteria As
String, ByVal Conditions As String)
Dim connection As New OleDbConnection(ConnectionToDatabase)
Dim UpdateString As String = "Update ScholarshipDescription Set
[Name]='" & Name & "', Amount='" & Amount & "', Year='" & Year & "',
Criteria='" & Criteria & "', conditions='" & Conditions & "' Where ID='" &
ID & "'"
Dim command As New OleDbCommand(UpdateString, connection)
connection.Open()
command.ExecuteNonQuery()
connection.Close()
error in UPDATE statement." What could be the problem or can somebody
suggest different solution.
I call this function from my main page.
Public Shared Function UpdateScholarship(ByVal ID As String, ByVal Name As
String, ByVal Amount As String, ByVal Year As String, ByVal Criteria As
String, ByVal Conditions As String)
Dim connection As New OleDbConnection(ConnectionToDatabase)
Dim UpdateString As String = "Update ScholarshipDescription Set
[Name]='" & Name & "', Amount='" & Amount & "', Year='" & Year & "',
Criteria='" & Criteria & "', conditions='" & Conditions & "' Where ID='" &
ID & "'"
Dim command As New OleDbCommand(UpdateString, connection)
connection.Open()
command.ExecuteNonQuery()
connection.Close()