Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CommandText Compile Error

Explorer ,
Apr 24, 2007 Apr 24, 2007
In Dreamweaver I've set up a database filter with following command:

CommandText='<%# "SELECT PGCCalenderALLYears.EventDate, PGCCalenderALLYears.Event, PGCCalenderALLYears.EventTime, PGCCalenderALLYears.Day, PGCCalenderALLYears.Venue FROM PGCCalenderALLYears WHERE (((PGCCalenderALLYears.EventDate) > DateValue( NOW() ))) AND ((PGCCalenderALLYears.EventDate) < DateValue( NOW()+2 )) AND (PGCCalenderALLYears.VENUE = "HOME")" %>'

And the test button in Dreamweaver works fine. However, when I try this in a browser I get a compile error:
Compiler Error Message: BC32017: Comma, ')', or a valid expression continuation expected.

so it looks like it doesn't like the quotation marks surrounding the VENUE, which I can understand. Odd that Dreamweaver is OK with this but it fails in real life!

Anyway - is there a way to specify a fixed value in the CommandText?
TOPICS
Server side applications
433
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 24, 2007 Apr 24, 2007
Try

CommandText=<%# "SELECT PGCCalenderALLYears.EventDate,
PGCCalenderALLYears.Event, PGCCalenderALLYears.EventTime,
PGCCalenderALLYears.Day, PGCCalenderALLYears.Venue FROM PGCCalenderALLYears
WHERE (((PGCCalenderALLYears.EventDate) > DateValue( NOW() ))) AND
((PGCCalenderALLYears.EventDate) < DateValue( NOW()+2 )) AND
(PGCCalenderALLYears.VENUE = 'HOME')" %>


--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004





Translate
LEGEND ,
Apr 24, 2007 Apr 24, 2007
Try

CommandText=<%# "SELECT PGCCalenderALLYears.EventDate,
PGCCalenderALLYears.Event, PGCCalenderALLYears.EventTime,
PGCCalenderALLYears.Day, PGCCalenderALLYears.Venue FROM PGCCalenderALLYears
WHERE (((PGCCalenderALLYears.EventDate) > DateValue( NOW() ))) AND
((PGCCalenderALLYears.EventDate) < DateValue( NOW()+2 )) AND
(PGCCalenderALLYears.VENUE = 'HOME')" %>


--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004





Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 24, 2007 Apr 24, 2007
LATEST
That's cracked it - why didn't I figure that one! Many thanks
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines