Solved

ADO .Requery

Posted on 2002-05-06
5
531 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

696 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