su_yumin

su_yumin

  • NA
  • 27
  • 0

Error updating Databse anyone can help?

Jun 10 2004 12:44 AM
can someone please tell me whats wrong with the following code... i cannot update my database, when i click the update button it says sybtax is UPDATE statement i believe is the database read write prob but i check the properties it allow users to write... if anyone know please help... Try Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & Server.MapPath("") & "\EX-Server.mdb" Dim myConn As New OleDbConnection(connString) myConn.Open() Dim strUpdateQuery As String = "UPDATE tblStudent SET E-Mail = '" & email & "' WHERE User ='" & user & "'" Dim myComm As New OleDbCommand myComm.CommandText = strUpdateQuery myComm.Connection = myConn myComm.ExecuteNonQuery() myConn.Close() lblWarning.Visible = True Catch ex As Exception lblWarning.Text = ex.Message() lblWarning.Visible = True End Try thanks for the help...

Answers (3)