Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: Pls help!

  1. #1
    New to the CF scene
    Join Date
    Mar 2007
    Location
    Philippines
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Pls help!

    we are having problem in a online examwe're doing, it connects to the database to get questions answers and questionnaires with their id's:

    it says:
    Error Type:Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
    [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'tb_questions.idType = tb_questionnaires.id And tb_questions.idType ='

    the statement in my program named "save.asp":
    strSQL = " Select idtype, strQuestionnaire, tb_questions.id, strQuestion "
    strSQL = strSQL & " From tb_questions, tb_questionnaires "
    strSQL = strSQL & " Where tb_questions.idType = tb_questionnaires.id "
    strSQL = strSQL & " And tb_questions.idType = " & request("txtOrder")
    strSQL = strSQL & " Order by tb_questionnaires.id "

    the other day it was working fine and then this morning it just became totally whacked!

    pls... help! and by the way I am a newbie here...

  • #2
    SSJ
    SSJ is offline
    Regular Coder
    Join Date
    Mar 2007
    Posts
    230
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Try to response.write your query and see if all the parameters are present there or not...

    You can also post query here

  • #3
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,065
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Whenever you see any error that says
    Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
    [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression

    In the error message you are being told that whatever the parameter is supposed to be in your query's where statement, it is not there. As SSJ said do this Response.Write strSQL You will see that it is coming back as

    Select idtype, strQuestionnaire, tb_questions.id, strQuestion From tb_questions, tb_questionnaires Where tb_questions.idType = tb_questionnaires.id And tb_questions.idType = Order by tb_questionnaires.id

  • #4
    New to the CF scene
    Join Date
    Mar 2007
    Location
    Philippines
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile re: SSJ

    thank you for the tip!
    .,-=programmer=-,.

  • #5
    New to the CF scene
    Join Date
    Mar 2007
    Location
    Philippines
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the explaination Miranda!!
    .,-=programmer=-,.

  • #6
    SSJ
    SSJ is offline
    Regular Coder
    Join Date
    Mar 2007
    Posts
    230
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Have you solved this?

  • #7
    New to the CF scene
    Join Date
    Mar 2007
    Location
    Philippines
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    @SSJ yup tnx a lot
    .,-=programmer=-,.


  •  

    Posting Permissions

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