This topic is locked
Dreamweaver MX SQL parameter handling
Posted 01 Jan 2003 23:43:32
01 Jan 2003 23:43:32 Andrew Korvin posted:Didn't see this board - I posted this on the Dreamweaver general section - should have been here...
I am struggling with a problem in Dreamweaver MX.
I have a database application dealing with event types that I'm trying to write a front end for. I have created a SQL query that selects events based on start date AND multiple event types ( ie MTG for "Meeting", CON for "Conference" etc. )
I am trying to query a SQL Anwywhere database and I have built a query in Infomaker ( Client Server report writer ) that accepts a date and a STRING ARRAY as arguments.
WHERE ( ev200_event_master.ev200_evt_type in ( :Event_type ) ) AND
( ev200_event_master.ev200_mi_date >= :Start_date )
ORDER BY ev200_event_master.ev200_mi_date ASC
Pretty simple ? You don't have to know much SQL to see how easy this is. It works fine. It accepts a simple string array like MTG,CON and returns both types. The problem is that in Dreamweaver, no matter how I construct the query - I can only retrieve ONE event type with the following syntax ( essentially the same )
SELECT EV200_EVT_ID, EV200_EVT_DESC, EV200_MI_DATE, EV200_MO_DATE, EV200_EVT_TYPE
WHERE EV200_MI_DATE >= ? AND EV200_EVT_TYPE IN (?)
ORDER BY EV200_MI_DATE ASC
I am testing the query directly with the advanced query builder in Dreamweaver MX and it works for ONE type ( ie 'MTG') but if I try to pass the string array THE WAY I KNOW THE DATABASE WANTS IT - it doesn't work.
I can't see why this is so difficult. It's just supposed to pass text to the database engine...
Somebody must have an answer for this?