Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003
    Posts
    5

    Unhappy Unanswered: Using a int var in sql statement

    This is what i have and i keep getting a type mismatch error
    obviously im doin it wrong.. all i wanna do is print out the first 6 topic names.

    DO UNTIL x=6
    strSQL = "SELECT * FROM Topic_Questions " _
    & "WHERE Topic_Number='" & Replace(x, "'", "''") & "';"
    Set objRS = objConn.Execute(strSQL)
    response.write(objRS("Topic_Title"))
    x++
    LOOP


    THANKS FOR ANY HELP

  2. #2
    Join Date
    Feb 2003
    Posts
    5

    Angry Re: Using a int var in sql statement

    TIS OK ive got it now

    dont need the ' 'after the = in the strSQL.

Posting Permissions

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