Please help: run-time error 3014-can't open any more tables 
Author Message
 Please help: run-time error 3014-can't open any more tables

I have a table with 17 Data Controls, all of them with the RecordsetType
"Dynaset". After loading and unloading the forms a few times, I get the
run-time error 3014, telling me that I can't open any more tables.
Those recordsets shouldn't be closed automaticly, when the form unloads?

Thank you in advance.

Pedro Vieira



Sat, 13 May 2000 03:00:00 GMT  
 Please help: run-time error 3014-can't open any more tables

Quote:

> I have a table with 17 Data Controls, all of them with the RecordsetType
> "Dynaset". After loading and unloading the forms a few times, I get the
> run-time error 3014, telling me that I can't open any more tables.
> Those recordsets shouldn't be closed automaticly, when the form unloads?

If you dim up a recordset object in a local procedure (i.e. sub or
function or property) as a variable, then all references to it will
be destroyed as soon as you leave the procedure. As a result, the
garbage collection mechanism kicks in and removes it for you. This
is pretty much guaranteed.

In contrast, recordset objects with global scope, which is effectively
what those associated with 'global' form controls are, aren't known for
their 'garbage-safe' integrity. You have to ensure that all references
to such objects are torn down yourself. Setting the variable (the
object reference) to Nothing does this. Naturally, you should .Close
the recordset first (courtesy), but the setting to Nothing should do
this - as the object 'dies', it should .Close whatever it's got.

In *principle*, when a form is unloaded, all of these controls,
specifically the data controls, should get dereferenced and die
gracefully. However, there seems to be some evidence that this
does not always happen. I tend to avoid data controls for this
reason. My avoidance of such may be more to do with myth and
legend than actuality, but I find that direct DAO programming
allows me to take care of my own quality control in this regard.

Quote:
> Thank you in advance.

> Pedro Vieira


--
Paul Sampson____Principal Consultant Onyx Systems______Onyx Internet
Zetland Buildings__Exchange Square__Middlesbrough__TS1 1DE__UK 33711 \\/+

BB 74 A4 EF 03 F8 44 C1 F3 75 FE C6 7E F9 6E 43  http://www.onyx.net >--<


Mon, 15 May 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Error 3014: Can't open any more tables

2. Error 3014: Can't open any more tables

3. Error 3014: Can't open any more tables

4. Can't open any more tables error 3014

5. Can't open any more tables - 3014

6. ? 3014 Can't open any more tables - Click header to sort by column fails

7. Err 3014, can't open any more tables

8. Error 3014 (too many Tables open)

9. Run-time error 3014 - 'Cannot open any more tables'

10. Run time error '3709' - Please Help

11. Please help: Run-time error '3001'

12. Run-time error '3011' linking table

 

 
Powered by phpBB® Forum Software