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

Thread: ado filter

  1. #1
    Join Date
    Jul 1999
    Posts
    7

    ado filter

    I opened a recordset using the flag adLockBatchOptimistic. This way I can
    make changes to the recordset and when needed, the changes are transferred
    to the database using the "Update" method.
    The problem is that when I use the Filter on such a recordset, it doesn't
    see the changes I made until I use the Update method. How can I make the
    Filter look through both the records that are already in the database and
    the ones that are still in the recordset buffer?




  2. #2
    Join Date
    Apr 1999
    Posts
    49

    Re: ado filter

    What's the cursor type? If you didn't set it, you use a forward only cursor (the default) and it's a static copy of your records. Maybe you should use the adOpenKeyset or the adOpenDynamic cursor

    ex. :

    Set rs = CreateObject("ADODB.Recordset")
    rs.CursorType = adOpenKeyset
    rs.LockType= adLockBatchOptimistic
    ...
    rs.Open ...

    BTW, you should use UpdateBatch method instead of Update method

    Marc


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