-
ASP SQL Error
Hi All,
I'm trying to run the following query.
UpdateSubjectRS.open "tblEnrol", conn, 2, 2
sql_query = "SET Taken = (tblgroup.taken + 1) WHERE tblgroup.subjid = '" & SubCode & "' AND tblgroup.grpNo = " & TutGrp & ";"
UpdateSubjectRS.update sql_query, Conn
I have tried many combinations of the above 3 lines and have allways got the same error.
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
Can any one tell me why this doesn't work??
Thanks
-
Try This
sql_query = "update tblEnrol "
sql_query = sql_query & " SET Taken = (tblgroup.taken + 1) WHERE tblgroup.subjid = '" & SubCode & "' AND tblgroup.grpNo = " & TutGrp & ";"
UpdateSubjectRS.open sql_query, Conn
OR also this is possilbe
sql_query = "update tblEnrol "
sql_query = sql_query & " SET Taken = (tblgroup.taken + 1) WHERE tblgroup.subjid = '" & SubCode & "' AND tblgroup.grpNo = " & TutGrp & ";"
conn.execute sql_query
-