Subject Re: [IBO] TIBOQuery modify Order affects Params
Author teamtlas
--- In, Helen Borrie <helebor@t...> wrote:
> At 03:38 AM 29/10/2003 +0000, you wrote:
> >Hi
> >
> >I am converting a number of BDE applications to IBO. Many of these
> >apps modify the Query SQL strings "ORDER BY" clause dynamically in
> >response to user input. The queries generally contain parameterised
> >"WHERE" clauses.
> >
> >The problem I am having is that since converting to IBO the first
> >"Open" of a query executes fine but after closing the query and
> >modifying the "ORDER BY" clause dynamically, the second "Open"
> >parameter problems such as "nn/nn/nn nn:nn:nn.nnnn is not a valid
> >date and time".
> This is a Delphi error, not a database one. Somehow your Date
variable is
> passing a string that Delphi can't parse as a valid date/time.
> What version of IBO are you using? If it's a fairly old one, it
could be a
> problem with the way IBO used to parse date inputs -- long ago
> Try to intercept Date and inspect what's being passed, before it
gets to
> the AsDateTime call. Delphi is very US-centric about data formats.
> 25/12/2003 isn't a valid date in Delphi.
> You'll find better ways in IBO to manage the parameter swapping and
> ordering, as well, though I don't think your current approach,
> hairy, is necessarily the cause of your current problem.
> Helen


I can't see how it can possibly be a Delphi error as the first query
open works fine and if I substitute Infopower TwwQuery for TIBOQuery
there is no problem.

I am using Delphi 7, IBO 4 (dowloaded 3 days ago), IB 6 and my date
format is dd/mm/yy.


Mark H (teamtlas)