My TRY CATCH shows Error when I run this. Can anyone see what's wrong
with this? Each textbox has OnTextChanged="ConChanged". This changed
boolean to TRUE and then Updates the customer.
Sub Update_Customer()
Dim strText as string
Dim strSQL as string = "UPDATE tblCustomers SET " & _
"(strEmail, strFName, strLName, strStreet, strCity, strState,
strZip) VALUES (" & _
"'" & tbEmail.text & "'," & _
"'" & tbFName.text & "'," & _
"'" & tbLName.text & "'," & _
"'" & tbStreet.text & "'," & _
"'" & tbCity.text & "'," & _
"'" & tbState.text & "'," & _
"'" & tbZip.text & "');"
'Dim strSQL as string = "UPDATE tblCustomers SET strEmail = '" &
tbEmail.text & "', strFName = '" & tbFName.text & "', " & _
' "strLName = '" & tbLName.text & "', strStreet =
'" & tbStreet.text & "', strCity = '" & tbCity.text & "', " & _
' "strState = '" & tbState.text & "', strZip = '"
& tbZip.text & "' WHERE CustID = " & ViewState("CustID") & ";"
TRY
Dim objConnection as New OLEDBConnection(myConnection)
Dim objCmd as New OLEDBCommand(strSQL, objConnection)
objCmd.Connection.Open()
objCmd.ExecuteNonQuery
Response.redirect("CheckOut.aspx?order=ASDF")
objCmd.Connection.Close()
Catch objError as Exception
Response.Write("Error")
END TRY
AddMe.Visible = FALSE
Success.Visible = TRUE
END Sub