473,406 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

maximum number of open recordsets - Access 2003/2007

hi,
I use DAO recordset to query database tables of MSAccess. I open the recordset and miss/forget to close it. Can anyone tell me the maximum number of recordsets that can be open at a time (on querying Access 2003 and Access 2007 table) after which it gives an error saying "no more tables can be open"?

Thanks,
Satheesh
Jan 12 '11 #1
2 5853
Stewart Ross
2,545 Expert Mod 2GB
Hi. We have an Insights article listing Access Specifications which lists the potential number of open tables as 2048, subject to reduction for internal system table usage.

Although 2048 appears to be quite generous, be aware that when you take into account the number of tables opened when running a typical multi-table SELECT query the limit on recordsets (rather than tables) is likely to be much lower than 2048.

Regardless of the limit, I would strongly advise you to ensure that all open recordsets are always closed at end of use.

-Stewart
Jan 12 '11 #2
ADezii
8,834 Expert 8TB
Keep in mind a lot has to do with the Scope of the Variable Declaration for the Recordset.
  1. If Dim rst As DAO.Recordset is Declared locally such as in the Click() Event of a Command Button, then the Recordset will be Closed automatically as soon as you Exit the Click() Event.
  2. If Private rst As DAO.Recordset is Declared in a Form's Code Module, then the Recordset will be Closed automatically as soon as you Close that Form.
  3. If Public rst As DAO.Recordset is Declared in a Standard Code Module, then the Recordset will be Closed automatically as soon as your Database is Closed.
  4. The above being said, you should 'always' Close a Recordset when you have finished it, and deallocate Memory assigned to the Object Variable as well, as in:
    Expand|Select|Wrap|Line Numbers
    1. rst.Close
    2. Set rst = Nothing
  5. If you are not sure of the State of the Recordset, then:
    Expand|Select|Wrap|Line Numbers
    1. If Not (rst Is Nothing) Then
    2.   rst.Close
    3.   Set rst = Nothing
    4. End If
Jan 12 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Avery | last post by:
All my number data in Access 2003 automatically rounds to the nearest interger, even when I request a 2 decimal place format. Is this a known bug and is there a fix for it?
2
by: plau011 | last post by:
Hello Access gurus, I am curious as to why you can't open an Access 2003 Db with Access 2000. We have a Visual Basic application which is using DAO 3.6 to connect to the Access database. It IS...
1
by: nosipho | last post by:
Hi guys, I want to upgrade to Office 2003/ 2007 Pro, currently I'm using Office 2000. the problem is I have an Access database which I'm not sure if I'll be able to access it with Office 2003/...
2
by: velocebit | last post by:
I am a newbie -- just finished one course in Access 2003, so I know enough to be dangerous. During the past few months I created a database for my business and had been using it quite satisfactorily...
2
by: VSS | last post by:
Hello, I need to know what is the maximum number of records Access can hold? I need approx. 6 million records, do you know if Access can hold this amount? Thank you everyone.
3
by: getro | last post by:
Hi Everyone, I need to open an Access 2003 form to a specific record from a custom Outlook 2003 Appointment form. The form has a command button that would pass a record id to access and open the...
0
by: f18jetpilot | last post by:
Does anyone know how to convert an access table to a csv file with either a macro or a module in an access database??? I can use either access 2003 or access 2007.
1
by: Johnny E Jensen | last post by:
Hej Group Using C# (Visual Studio 2005) I would like to be able to create a table in an Access 2003/2007 database. I am using OLEDB provider but i can see how to do this. Can anone give me a...
9
by: Moor | last post by:
I have a .MDB back-end database that is created with Access 2.0. And multiple front-end mdb's, some are created by Access 2.0, and the rest are created by Access 2003. The fron-ends had table...
5
by: Lysander | last post by:
My collegue had to buy a new laptop that came with Office 2007 already installed. She had Access 2003 installed on top, in a different directory. None of our 2003 databases will run on her...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.