Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

to much tables open

Status
Not open for further replies.

patweb

Programmer
Apr 17, 2003
174
BE
I have a procedure. In this there are a large number of SQL instructions. Via a case instruction he execute effectively one of these SQLs. The problem is, at a certain point I have so much SQLs that I get Error "3014" TO MUCH TABLES OPENED. Because at running the procedure he runs every SQL statement, also these which are not used. They give me the advice to make several procedures. I can't do this because these code belongs together.

Is it enough to close (rst.close) each recordset followed on these SQLs or can you close or sail round SQLs when they are not used ?

SQL119 "..."
Set mkqry119 = dbs.CreateQueryDef("", SQL119)
Set rstqry119 = mkqry119.OpenRecordset(dbOpenDynaset)

pat
 
I recommend ALWAYS closing your recordsets. It helps your programs run faster.
 
ok,

but I think this is not the solution. The error is "3014", to much tables open (read SQLs). If you close the recordsets in the select case parts and you only select only one case then all the SQLs (tables) are still open.
 
Hmm... Is there a way that you can open them in the Select Case?
 
Is that the actual wording you see for that error or is it
Error 3014 - Can't Open Any More Tables.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top