...

View Full Version : Pls help!



zaizaices8
03-20-2007, 07:44 AM
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 ='
:confused:
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! :eek:

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

SSJ
03-20-2007, 01:09 PM
Try to response.write your query and see if all the parameters are present there or not...

You can also post query here

miranda
03-21-2007, 04:47 PM
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

zaizaices8
03-22-2007, 05:36 AM
thank you for the tip! :thumbsup:

zaizaices8
03-22-2007, 05:40 AM
Thanks for the explaination Miranda!!

SSJ
03-22-2007, 01:33 PM
Have you solved this?

zaizaices8
03-29-2007, 03:01 PM
@SSJ yup tnx a lot



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum