I get an error when I run this ASP script which says that edit is not supported. I believe that actually is supported, but is there anything else that could be wrong, or some other error in the code. I am sure that the database connection is being made, and that the database can be read and written. The code is:
<%
Const adOpenKeyset = 1
Const adLockOptimistic = 3
dim dbConnection, rs, SQL
set dbConnection = Server.CreateObject("ADODB.Connection"
dbConnection.Open "CPS322"
set rs = Server.CreateObject( "ADODB.RecordSet" )
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.ActiveConnection = dbConnection
if request( "Action" ) = "UpdateListcourses" then
SQL = "SELECT * FROM RegistrationOfferings WHERE CrsNum='" & request("CrsNum"
& "' AND Dept='" & request("Dept"
& "' AND Year='" & request("year"
& "' AND Section='" & request("Section"
& "' AND Term='" & request("Term"
& "' AND StuNum='" & request("StuNum"
& "'"
rs.open SQL
rs.edit
rs("CourseEval"
= true
rs.update
rs.close
SQL = "SELECT * from evaluations"
rs.open SQL
rs.addNew
rs("Year"
= request("Year"
rs("Dept"
= request("Dept"
rs("CrsNum"
= request("CrsNum"
rs("Section"
= request("Section"
rs("CrsOverall"
= request("CrsOverall"
rs("CrsOverallComments"
= request("CrsOverallComments"
rs("ProfOverall"
= request("ProfOverall"
rs("ProfOverallComments"
= request("ProfOverallComments"
rs.update
rs.close
end if
<%
Const adOpenKeyset = 1
Const adLockOptimistic = 3
dim dbConnection, rs, SQL
set dbConnection = Server.CreateObject("ADODB.Connection"
dbConnection.Open "CPS322"
set rs = Server.CreateObject( "ADODB.RecordSet" )
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.ActiveConnection = dbConnection
if request( "Action" ) = "UpdateListcourses" then
SQL = "SELECT * FROM RegistrationOfferings WHERE CrsNum='" & request("CrsNum"
rs.open SQL
rs.edit
rs("CourseEval"
rs.update
rs.close
SQL = "SELECT * from evaluations"
rs.open SQL
rs.addNew
rs("Year"
rs("Dept"
rs("CrsNum"
rs("Section"
rs("CrsOverall"
rs("CrsOverallComments"
rs("ProfOverall"
rs("ProfOverallComments"
rs.update
rs.close
end if