CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Guest

    ADO recordset Find method, more than a field

    Hello!
    I´m attached to a SQLServer 7.0 database.
    I' m not able to pass more than a field for search in a criteria string
    for the ADO recordset find method.

    Imagine a recordset which has the contents of a table called books,
    two of its fields are called idbook and bookname.
    I would need a thing like:

    rs.Find "idbook>2 and bookname like 'the%'"

    When i use more than a column(field) for tyhe criteria string, i have an error
    telling "the application is using wrong arguments,or out-of-range arguments". Always the same error number, 3001


    Can anyone give me a solution for this?

    Thanks for your help





  2. #2
    Join Date
    Aug 1999
    Location
    India, West Bengal
    Posts
    36

    Re: ADO recordset Find method, more than a field

    In ADO there is a limitation. In MSDN, this limitation is documentated. There is no way you can include two field conditions in the 'where' criteria statement for the find method. Can only used a one field search.

    Trust Microsoft to mess up is own standards as it brings out newer controls and all.


  3. #3
    Join Date
    Nov 1998
    Location
    Philadelphia, USA
    Posts
    11

    Re: ADO recordset Find method, more than a field

    Yeh - Had the same problem
    Ended up breaking all of cobb's et al data normalization standards.
    What I did was to create a compound field of the fields I knew I had to "find" in my application.
    For example create a field called ID_Title and stuff it with the concatenated fields
    Cheers
    Rob



  4. #4
    Join Date
    May 1999
    Posts
    3,332

    Re: ADO recordset Find method, more than a field

    msdn article Q195222 has all the details and workarounds for the limitation of the Find method.


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