CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 1999
    Posts
    45

    Seek/Find methods

    Hi ,

    I have trouble using the "Find" method for ADO;
    If Employees table has one-field Index : LastName, then this statement will
    work fine :
    strSearch = "LastName = 'ABC' "
    DataEnvironment1.rsEmployee.Find strSearch

    But if Employees table has mutiple-field index : LastName & FirstName,
    then I am stuck:
    strSearch = "LastName = 'ABC' , AND FirstName = 'DEF' "
    DataEnvironment1.rsEmployee.Find strSearch

    ---> The error message I've got is:
    "The application is using arguments that are of the wrong type ,
    are out of acceptable range or are in conflict with one another"

    Please help me out.
    Thanks








  2. #2
    Guest

    Re: Seek/Find methods

    You could have that error in case if your record contains single quote, for example Last Name is "O'Bryan".
    Vlad


  3. #3
    Join Date
    Aug 1999
    Posts
    45

    Re: Seek/Find methods

    Not really, My data does not have any quotes.
    I even tried to "find" on Fields of number format (EmployeeID....),
    but still


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

    Re: Seek/Find methods

    read MSDN article Q195222.
    it states that ADO find method only supports one criteria!
    it also gives you a few workarounds like using Filters.


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