473,666 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

maximum number of open recordsets - Access 2003/2007

1 New Member
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 5882
Stewart Ross
2,545 Recognized Expert Moderator Specialist
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 Recognized Expert Expert
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
6943
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
4309
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 able to open an 2000 and 2003 Db because they are all in Jet 4 database format, I assume. But when trying to open an Access 2003 Db from Access 2000 you get the 'Unrecognized database' Error. Aren't they the same database structure and the only...
1
1989
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/ 2007. So is there anyone who knows about this? Please help ,soon Ragards
2
2981
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 until yesterday when it failed to open! I am distraught. My most recent backup in two days older than the version that will not open and I hate the thought of picking through and trying to update the backup with two days worth of data. I...
2
23112
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
3988
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 appropriate record. I have searched through many Outlook and Access books and the web and cannot seem to find any info on this. Your help would be greatly appreciated. Serge
0
1262
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
1788
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 hint? Kind regards Johnny E. Jensen
9
2403
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 attachments to the back-end database. The problem is I'm unable to access any table by both versions of Access in the same time! Here are the steps to replicate the problem 1- Open one Access 2.0 front-end mdb, then open the attached table T1
5
10528
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 laptop, all giving the error "Form Open- Event, property does not exist" or something like that. This happens with every form. We can access the database, but not open any form. Going into a module of code, we can compile ok, no errors. Checking...
0
8356
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8781
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8551
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8639
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4368
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1775
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.