memory and sqlCe

  • Thread starter Thread starter Bruno
  • Start date Start date
B

Bruno

Hello,

I make a software which read and write in SQLCe tables, but at each action
( read, write, update), memory down ;
I start with 6Mo, but after 100 actions , memory is 2Mo, and software bug.
I dispose each element (connection, datareader, sqlcommand, but not better)
I tried to create and open 1 connection, 1 datareader, but finally, memory
down ( after about 200 actions in the better)

thanks for your help
 
Bruno,

To help you, we would need to see your code - I can assure you
that it is possible to have a CF1.0 application that is constantly
using SQL CE all day long without running out of memory on
device. There is something you are not disposing of, and in my
experience the most common thing that could cause something
as dramatic as you are reporting is not closing and disposing
of SqlCeDataReaders and SqlCeCommands.

--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com
 
Hi Bruno,

I had a simular problem at my SQLCe beginner day's. Since I add connetion
Dispose(). It get better, but a GC.Collect() helps to run my application for
a long time (1..3 Days with 10000 insert's).
I use .Net 1.1 and SQL 1.x . Maybe the GC on .Net2.0 work better.

Stephan
 
Back
Top