CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2001
    Posts
    254

    Using Find Method with multiple criteria

    I' tryring to use FIND METHOD (ADO) keeps giving me

    RunTime Error "3001"
    Argument are of the wrong type, are out of acceptable range, one are in conflict with one another

    I've tried various techniques still no luck. Is it a BUG or not possible to use this method with multiple criteria using AND
    anybody know's the systax.?

    dim xstring as string
    xstring = "Colom1='13' AND Colom2='XX'" (failed)
    xstring = "(colom1='13' AND colom2='XX')" (failed)
    xstring = "colom1='13 " ' " AND "colom2= ' XX " ' " (failed)
    xstring = "colom1 like '13' AND colom2='XX' " (failed)

    the final Syntax:

    rs.find xstring, 0, adSearchforward, 1




  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Using Find Method with multiple criteria

    Check out the "Find Method [ADO} in MSDN Help. It says only a single column may be specified. Also your operator "AND" is not allowed in the criteria. It uses ><= etc.

    John G

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