Solved

ADO .Requery

Posted on 2002-05-06
5
524 Views
Last Modified: 2010-05-02
    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
Comment
Question by:GebhartBob
  • 2
  • 2
5 Comments
 
LVL 1

Expert Comment

by:ramani_gr
ID: 6993263
0
 
LVL 1

Accepted Solution

by:
barendb earned 100 total points
ID: 6993999
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
 

Author Comment

by:GebhartBob
ID: 6998018
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
 
LVL 1

Expert Comment

by:barendb
ID: 6998198
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
 

Author Comment

by:GebhartBob
ID: 7000403
    You learn something new every day. Thanks very much for taking the time to reply.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now