Subject Re: [IBO] Parameter looses value on reorder
Author Florian Hector
Lucas,

thank you for your reply.

> The problem ist that you store dates in Timestamp fields.
> Either store them as DATE (in dialect 3) or make sure that you cut the
> timestamp field before saving (sth. like trunc ( ....) in the Before
> Post)

It is a dialect 3 DB, as least it is being recognised as such by
IB_Connection.
Datum is defined as Date, see the SQL script for creating the DB.

> Then you can assign the param like:
> IB_Query1.ParamByName('Datum').AsDateTime :=
> trunc(DateTimePicker1.Date);
>
> and all your problems are gone.

Unfortunately not, at least not here with my setup.(D5, W2K, IBO 4.2I)
I have tried it with ..AsDate as soon as Helen mentioned this to me, but
the effect was still the same.

Anyway, when I tested over the weekend I was always monitoring the
statements sent to the server. It did not matter if the parameter was set
with ...AsDate, ...AsDateTime, ...AsString and on the other side of the
statement things like ...DateTimePicker1.DateTime,
...StrToDate('09.11.2002'), ...DateTimePicker1.Date.

After assigning the parameter for the first time, monitor always showed
something like this:
PARAMS = [ Version 1 SQLd 1 SQLn 1
[DATUM] = '09 Nov 2002' ]

So, once the query has the param it should not get lost, or should it?

Since it didn't make a difference I didn't pay attention when I put together
the ZIP.

Have you tried it on your PC? Did it work there?

Florian

PS: Didn't see any other posts related to the topic than those from Andreas,
I would have answered.