SQLServerCe error- Not Enough storage is available to complete this operation

T

Terry

I am at a loss with this one. I am populating a database with fewer than
300 records on a clean table. However, at about the 100/120th record I get
the error message:



Not Enough storage is available to complete this operation.



To track down the error I set a button up to keep populating the records
manually, what I found is that if I re-run my app and read in the previous
data in to a list then populate it I don't get the error as much as I do
from the start.



Anyone had this problem before?
 
S

Scott Colestock

I've noticed the desktop framework returning an exception such as this in an
out-of-memory condition, which is a little counter-intuitive since it sounds
"disk" related.
You may want to look at memory pressure.

- Scott Colestock
 
A

Andreas Broman

I have the same problem! It seems that the garbage collector does not care
about memory used up by unmanaged code (SQL Server CE) and thus thinks that
it is safe to allocate more memory (without having to clean up old garbage)
and then hits the 32Mb barrier for a process, resulting in a out-of-memory
exception.

What can you do until Microsoft fixes this?
Call GC.Collect() at regular intervals.

/Andreas
 
Joined
Mar 29, 2006
Messages
1
Reaction score
0
I have the same problem. I call GC.Collect at regular intervals and that fixe couple problem. But I still have a memory problem. I want to know if its a problem in the compact framework 2.0 because on 1.1 the application run without problem of memory. And the 1.1 version is my first ppc application, you can imagine all scrap this version have :). But de second version of the application with cf 2.0 is better but have memory problem.

The application with cf 1.1 weight 2.30mb and the version with cr 2.0 weight 502k ....

I realy need help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top