?
Solved

ADO .Requery

Posted on 2002-05-06
5
Medium Priority
?
532 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 400 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

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!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month9 days, 23 hours left to enroll

762 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