CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2000
    Posts
    12

    ADO.Recordset.Filter with like and no case sensitivity

    Hi all,

    I'm trying to filter a ADO 2.5 Recordset with
    a statement similar to this:

    select * from MyTable
    where UPPER(StrColumn) like UPPER(CompareStr)

    It doesn't seem to be allowed to use Database
    functions like "UPPER". So is there any way to
    achieve this using the Filter property?
    The only way I know so far is to filter the
    Recordset by modifying the original select
    statement which I'd rather leave untouched.

    Thanks in advance

    Alexander Kempf


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: ADO.Recordset.Filter with like and no case sensitivity

    'apply filter
    rs.Filter = "author like 'J*'" 'author is a field

    'eliminate filter
    rs.Filter = ""

    rs.Filter = "fieldname = " & sCriteria







    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Dec 2000
    Posts
    12

    Re: ADO.Recordset.Filter with like and no case sensitivity

    Thanks for your help. It works fine for filters
    with no case sensitivity (I was wrong to think
    the filter was case sensitive).
    Is there also a way for case sensitive filters?

    Alexander Kempf


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured