• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 535
  • Last Modified:

ADO .Requery

    I think I know what .Requery does ... it effectively closes and re-opens the table ... and I believe I know when you have to use it.
 
     If 3 consecutive .Seeks fail, you get this bogus ADO error: "Row handles must all be released before new ones can be obtained." Issuing a .Requery before the .Seek makes this problem go away.
 
     I've probably overkilled the problem by issuing a .Requery before every .Seek. I assume there is a performance penalty for this, but have no idea what it is, if anything.
 
     My question: Other than this rather exotic use ... effectively a kludge to avoid a known ADO bug ... what is the purpose of .Requery? Am I paying much for over-using it?
0
GebhartBob
Asked:
GebhartBob
  • 2
  • 2
1 Solution
 
ramani_grCommented:
0
 
barendbCommented:
Requery is used to get recordset updates in a multi-user system on a persistent connection.  I don't think you are taking a major performance hit, unless your server is already extremely busy.  Then it will affect the server and LAN traffic.
0
 
GebhartBobAuthor Commented:
barendb---
 
     Thanks for your input.
 
     I know what "a multi-user system on a persistent connection" is, but don't understand what you mean when you say, "Requery is used to get recordset updates". Can you clarify this for me?
0
 
barendbCommented:
When a user makes changes, it will be written to the database on the server, but the other users on the system will not automatically see these changes.  The other users will only see these changes after doing a requery.

Regards
Barend
0
 
GebhartBobAuthor Commented:
    You learn something new every day. Thanks very much for taking the time to reply.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now