[DUG] Can anyone explain this?

Daryl Marsden Daryl.Marsden at ecan.govt.nz
Mon Aug 3 12:01:30 NZST 2009


Not sure if this is relevant to ADO but with MS Access I've found in
some circumstances that dates must be specified with a # qualifier at
the start.  Your code assumes implicit data type conversion.  Another
possibility could be your date format being incompatible.

Regards,
Daryl

-----Original Message-----
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
On Behalf Of Jeremy Coulter
Sent: Monday, 3 August 2009 11:25
To: 'NZ Borland Developers Group - Delphi List'
Subject: Re: [DUG] Can anyone explain this?

Didn't like that either. Ah well, will just re-write it as an SQL as it
should be anyway!

Jeremy

-----Original Message-----
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
On
Behalf Of Michael Rooney
Sent: 3 August 2009 11:17
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


_______________________________________________
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

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.clearswift.com
**********************************************************************




More information about the Delphi mailing list