Subject Re: [IBO] Data Parameters and IBObjects/Firebird
Author Paul Vinkenoog
Hi Jason,

> Can anyone tell my why this code doesn't work? I am using IB_Query
> components.
>
> SELECT WORKINGDOCKET.DOCKETID AS WORKDOCKETDOCKETID
> , DATEOPENED
(...)
> WORKINGDOCKET.SOCIALSECURITY
> WHERE WORKINGDOCKET.DATEOPENED BETWEEN :DATE1 AND :DATE2
(...)
> Its definitely this line WHERE WORKINGDOCKET.DATEOPENED BETWEEN
> :DATE1 AND :DATE2
>
> that causes the trouble, and I assume its because the date1 and
> date2 parameters are not specifically defined as timestamps - but I
> cant find anywhere to do that. I know when I was using ADO the
> parameter type had to be specified as datetime for it to work.

If you assign the param values in code, do it like this:

MyQuery->ParamByName( "DATE1" )->AsDateTime = ...


Greetings,
Paul Vinkenoog