Board index » delphi » Filters that worked in DAO don't work using ADO

Filters that worked in DAO don't work using ADO

I am using Delphi 5 and ADOExpress, connected to a Microsoft Access
database.  My application used to use DAO and I have migrated it to ADO
using ADOExpress.  I am using a filtered ADO Table object and am having
problems with filters that worked under DAO.

Example:  The filter

Project = 'Navy Sys Eng' AND (Status = 'Open' OR Status = 'In Progress')

fails with the message "The application is using arguments that are of the
wrong type, are out of acceptable range, or are in conflict with one
another".

if I take out the parenthesis and use

Project = 'Navy Sys Eng' AND Status = 'Open' OR Status = 'In Progress' then
I don't get an exception, but I don't get the results I want either.

Apparently, ADO doesn't like the parenthisis.  Anybody know why this isn't
working?

--Greg Dawson

 

Re:Filters that worked in DAO don't work using ADO


On Thu, 10 Feb 2000 11:54:29 -0700, "Greg Dawson" <daws...@lincom.com>
wrote:

Quote
>Example:  The filter

>Project = 'Navy Sys Eng' AND (Status = 'Open' OR Status = 'In Progress')

>fails with the message "The application is using arguments that are of the
>wrong type, are out of acceptable range, or are in conflict with one
>another".

>if I take out the parenthesis and use

>Project = 'Navy Sys Eng' AND Status = 'Open' OR Status = 'In Progress' then
>I don't get an exception, but I don't get the results I want either.

>Apparently, ADO doesn't like the parenthisis.  Anybody know why this isn't
>working?

I know this is very old message now but i'd like to know what will be
if you try this:

((Project = 'Navy Sys Eng') AND (Status = 'Open')) OR (Status = 'In
Progress') AND (Project = 'Navy Sys Eng'))

I also didn't know this limitation of ADO before.
You also should read:
http://support.microsoft.com/support/kb/articles/Q235/8/92.ASP

Tomek Cwajda
(szaman)

Re:Filters that worked in DAO don't work using ADO


Tomek,
I experienced this situation with filtering too - your post has just
enlightened me.  Thank you!
--
David Reed
www.diamondsg.com
Quote
> http://support.microsoft.com/support/kb/articles/Q235/8/92.ASP

Re:Filters that worked in DAO don't work using ADO


If I am not wrong you must have spaces between operators on filters.  Try
Project  =  'Navy Sys Eng' AND (Status  =  'Open'  OR  Status  =  'In
Progress')

L:uis

Quote

"David Reed" <davidr...@worldnet.att.net> wrote in message

news:8br5fi$h7612@bornews.borland.com...
Quote
> Tomek,
> I experienced this situation with filtering too - your post has just
> enlightened me.  Thank you!
> --
> David Reed
> www.diamondsg.com

> > http://support.microsoft.com/support/kb/articles/Q235/8/92.ASP

Other Threads