[DUG] Can anyone explain this?
Alan Rose
Alan.Rose at trimble.co.nz
Mon Aug 3 12:02:44 NZST 2009
It just a guess but with ADO it might pay to use the ODBC Canonical form
of the date or timestamp in your filter. This avoids any
misunderstanding due to localization when using dates.
The date format is {d 'yyyy-mm-dd'} e.g { d '2009-03-01'} no idea if
it works in a filter
> -----Original Message-----
> From: delphi-bounces at delphi.org.nz
> [mailto:delphi-bounces at delphi.org.nz] On Behalf Of Michael Rooney
> Sent: Monday, 3 August 2009 11:17 a.m.
> To: NZ Borland Developers Group - Delphi List
> Subject: Re: [DUG] Can anyone explain this?
>
> I'm not using ADO and can't check this, but if there are no
> other suggestions maybe try something like:
>
> [deleted=false] and not (starttm<'1 Mar 2009') and not (endtm>'20 Mar
> 2009') and endtm >='1 Mar 2009'
>
> Be sure to check and re-check the logic there is equivalent
> to your expression. I haven't had enough coffee yet today to be sure.
>
> Good luck,
>
> - Mike.
>
> On 8/3/09, Jeremy Coulter <jscoulter at gmail.com> wrote:
> > Hi all.
> > I have been using some native DAO controls to talk to an
> Access DB for
> > some time and now I want to use ADO in preperation for moving to a
> > later version of Delphi.
> >
> > For one particular part I am running a filter on a table. I
> know this
> > is not the best thing, but for now I have to keep using it
> until I can change it.
> >
> > with the DAO control I can go: ([deleted=false] and
> (starttm>='1 Mar
> > 2009' or endtm <='20 Mar 2009') ) and (endtm >='1 Mar 2009') This
> > works fine.
> > HOWEVER, when I use this in the ADO control it throws an error that
> > arguments are of an unexpected type, or something like that.
> > IF I remove the trailing "and (endtm >='1 Mar 2009')" its fine.
> > However I need this.
> > Obviously I should just use a query and I will, I just need to get
> > this working first THEN I can change it.
> >
> > Anyone got any ideas?
> >
> >
> > Jeremy
> >
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz
> with Subject: unsubscribe
>
More information about the Delphi
mailing list