Click here to Skip to main content
15,901,284 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am having a problem in which i am trying to read record from one table and update those records into a second table ........... my query works fine for around 60-70 records. the it gives an error, can not open any more tables. I am not opening any other table except two related.



Message=Cannot open any more tables.
Source=Microsoft JET Database Engine
Posted
Comments
Hemant Singh Rautela 12-Jun-13 4:19am    
can you post your code...

Dont make too many objects running in loop. It will eat the memory allocated by the memory allocator . As you run out of memory you get exception, make sure you close all readers and adapters.
 
Share this answer
 
Did you translate the message correctly?
I think you open a connection for every update query, and do not close it afterwards. Call the Dispose() method of the connection object, or use using statements.
 
Share this answer
 
Comments
raeeschaudhary 12-Jun-13 3:10am    
If it is like that, why it updates records for first 50 odd records. m having trouble to understand, in my case it works fine from ID 323 to 378,,,,,,,,,
Bernhard Hiller 12-Jun-13 4:38am    
Because the number of connections to the database is limited. Learn some basics!
raeeschaudhary 12-Jun-13 6:09am    
got it right,,,, i am using a single connection :P

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900