Results 1 to 3 of 3

Thread: ASP SQL Error

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Posts
    8

    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

  2. #2
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Earth
    Posts
    762

    Cool

    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Posts
    8
    That Worked thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width