NotesSQL 3.02f w/MSQUERY and date parameters

I’m tyring to automate a NotesSQL query that selectes on dates. It works just fine with a hard coded date

SELECT

dist_number,

create_date,

call_status,

scheduled 

FROM

Contact CONTACT 

WHERE

dist_number IS NOT NULL

AND create_date = '2005-04-05'

AND scheduled = 'Y'

AND dist_number > 0 

ORDER BY

2, 

1

However, when I try to place a question mark in place of the date string and enter the exact same date string into the Parameter pop-up, I get “Syntax Error in date”. If I just enter the date, I get a “Invalid Scale Value” error.

Is there a way to pass a date as a WHERE clause parameter. Doesn’t seem to work in any combination of quotes, questionmarks and braces that I have tried. E.g. create_date=‘?’ or create_date={d ?} or create_date=?

Subject: NotesSQL 3.02f w/MSQUERY and date parameters

What are you using to bind the parameter? Are you coding using the ODBC API? If so, the valueType parameter needs to be set to SQL_C_DATE and the ParameterType needs to be set to SQL_DATE, the ParameterValuePtr should have your date in it (2005-04-05). Your where clause should contain this → create_date=?

More info from the ODBC API:

If you’re not writing ODBC API directly, let me know what you’re coding in.

Ron