Re: TADODataSet Filter



Serge Myrand wrote:

Hello,

Trying to filter a ADODataSet I get an error message when using an OR
in the filter. The message is EOleException, Arguments are of the
wrong type, are out of acceptable range or are in conflict with one
another.

This one works find
Filter := '(Compagnie = 'ELECTRO-OPTICAL INC.') AND ([Prêt à exp R] >
0) '

This one does not
Filter := '(Compagnie = 'ELECTRO-OPTICAL INC.') AND ((Prêt à exp R] >
0) OR ([Prêt à exp] > 0))'


Any hint will be appreciate
thank you in advance
serge

additionally to what Brian suggested it's better to always use
QuotedStr function when assigning strings to filters, i.e.,

Filter := QuotedStr('blablablabla') + ' AND ' +
QuotedStr('bleblebleble') + ...;

This way you avoid a lot of problems.

--
Best regards :)

Guillem Vicens Meier
Dep. Informática Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam

.



Relevant Pages

  • Re: Send an e-mail from my contacts form
    ... and still get the same error message. ... I think until I find out what the filter problem is and where it is at I am ... "Pete D." ... I went to edit hyperlink and in the address where it read http:// I ...
    (microsoft.public.access.modulesdaovba)
  • RE: if recordset is empty, add new record
    ... I also tried to use the Docmd.gotoRecord,, acNewRec instead of the addnew ... the error message is on the Docmd line and says "can't ... record if none match the filter. ...
    (microsoft.public.access.gettingstarted)
  • Re: Send an e-mail from my contacts form
    ... I went to edit hyperlink and in the address where it read http:// I ... "Pete D." ... error message "Cannot Find ''. ... I don't know if this is related but I have a filter problem that I ...
    (microsoft.public.access.modulesdaovba)
  • Re: Send an e-mail from my contacts form
    ... No but repost you filter problem in a new thread and make sure to post ... and still get the same error message. ... "Pete D." ... I went to edit hyperlink and in the address where it read http:// I ...
    (microsoft.public.access.modulesdaovba)
  • Re: Send an e-mail from my contacts form
    ... I went to edit hyperlink and in the address where it read http:// I changed ... "Pete D." ... error message "Cannot Find ''. ... I don't know if this is related but I have a filter problem that I can't ...
    (microsoft.public.access.modulesdaovba)