Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Problem with advanced recordset

Posted 02 Dec 2001 07:26:01
1
has voted
02 Dec 2001 07:26:01 Patrick Meunier posted:
Hi all,

I want to make a poll. I've tried to join my two db table of the poll with the following sql queries in the advanced recordset tab:

QUESTION.QUEST_ID,QUESTIONS,QUEST_DESCRIPTION,ANS_ID,ANSWERS,LAST_VOTE,QUEST_DATED,TOTAL_VOTES
FROM QUESTIONS INNER JOIN ANSWERS ON QUESTIONS.QUEST_ID = ANSWER.QUEST_ID
WHERE QUEST_ACTIVE = 1

I've got this error: Error during query: Unexpected Exception: java.sql.SQLException message given: Syntax error or access violation: You have an error in your SQL syntax near 'QUESTION.QUEST_ID,QUEST_DESCRIPTION,ANS_ID,ANSWERS, LAST_VOTE,QUEST_DAT' at line 1

I'm almost certain that my syntax is correct...I use phakt 1.06,ultradev 4, with win XP pro...


Hope someone can help me...




Patrick
------------
Reset! The one magical button!

Replies

Replied 02 Dec 2001 11:19:53
02 Dec 2001 11:19:53 Owen Eastwick replied:
You need the SELECT statement:

SELECT QUESTION.QUEST_ID,QUESTIONS,QUEST_DESCRIPTION,ANS_ID,ANSWERS,LAST_VOTE,QUEST_DATED,TOTAL_VOTES
FROM
QUESTIONS INNER JOIN ANSWERS ON QUESTIONS.QUEST_ID = ANSWER.QUEST_ID
WHERE QUEST_ACTIVE = 1

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 03 Dec 2001 05:31:20
03 Dec 2001 05:31:20 Patrick Meunier replied:
Doh!

I forgot...but before it was right...
now the error with SELECT

Error during query: Unexpected Exception: java.sql.SQLException message given: Syntax error or access violation: You have an error in your SQL syntax near ON QUESTIONS.QUEST_ID = ANSWER.QUEST_ID WHERE QUEST_ACTIVE = 1

It was the first error I got...In the error, it refer to an access violation...can it be that?



Patrick
------------
Reset! The one magical button!

Reply to this topic