Subject Re: [IBO] SQLWhereItems question
Author Helen Borrie
At 01:31 PM 07-05-01 +0200, you wrote:
>Hi,
>
> Probably a simple question, but I couldn't solve it. The problem is : how
>can I add a Date parameter to the SQLWhereItems property ? The value is
>coming from a edit box, that is assigned to a local variable tmpDate. I
>tried it like this :
>
> The value of tmpDate = 31/03/2000, European format.
>
> SQLWhereItems.Add ('DATE_TRANSACTION = ' + #39 + tmpDate + #39);
>(#39 = ' )
>
>I get an error "Conversion Error from string ...". The only way to assign
>it is like a string, so I'm stuck.
>
>Any idea ?
>
>Thank you,
>
>Nico


Nico, you need to send the date literal in a format recognised by IB. IB doesn't recognise 'dd/mm/yyyy'. Catch your user's entry and change tmpDate to 'dd.mm.yyyy',

then

SQLWhereItems.Add ('DATE_TRANSACTION = ' + QuotedStr(tmpDate));

Cheers,
Helen


All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________