I have noticed that some sql strings work differently in Access and SQL Server 2000. I am using SQL Server 2000 for this particular page.
I am getting the following error message: Line 1: Incorrect syntax near '='.
/EditStaffInfo.asp, line 27
It is likely that I have a typo somewhere. The form will show the data. I get the above error message after I press the button. I have bolded the significant parts of my code.
Here's my code:
'----------------------------------------------------------
' name: CreateOneRecordRecordset(soughtKeyValue)
'----------------------------------------------------------
Sub CreateOneRecordRecordset(soughtKeyValue)
'Build the sql query used to fill the select element
sqlString = "select * from MMBCStaff where StaffID=" & soughtKeyValue
'Create a recordset
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sqlString, connectionString, adOpenDynamic, adLockOptimistic
End Sub
'----------------------------------------------------------
' name: EditOneRecordRecordset(soughtKeyValue)
'----------------------------------------------------------
Sub EditOneRecordRecordset(soughtKeyValue)
dim Edited
'Get values for new record
rs("Name") = Request.Form("txtName")
rs("Title") = Request.Form("txtPosition")
rs("Email") = Request.Form("txtEmail")
rs("Bio") = Request.Form("txtaBio")
& ;nbs p;
rs.Update
Edited = "True"
End Sub
'----------------------------------------------------------
' name: DrawPage
'------------------------------------------------------