Subject Re: [firebird-support] ISC_TIMESTAMP vs. Current Time
Author Helen Borrie
At 10:06 AM 6/05/2007, you wrote:
>I need to pull two dates from a table and compare them to the current
>time. I keep getting an error that there is an illegal string
>conversion of \"31-MAY-2007\", which is the date in the TIMESTAMP field.
>Below is a code fragment of what I'm attempting to do...any advice
>would be appreciated....

The expression

where aTimestamp between '01-MAY-2007' and '31-MAY-2007'

is valid (note the SINGLE quotes)

while this expression

where aTimestamp between ? and ?

must receive timestamps in the parameters. (Date literals are
literals, so passing them as parameters you are passing
strings.) Your app has to pass the dates as a type that is
compatible with TIMESTAMP.

Reading the Beta IB6 API Guide pp. 167-170 would probably be useful
for you to work out what you really need to pass in your xsqlvars
(i.e. how to arrive at the tm struct you need).