Exception with SQLCe on Emulator

H

henning

Hi!

i have an application using an sqlce database... nothing big... just
some tables containing needed information...
i use a dataset to work with this database to get and store
information...
the whole application is tested on the given emulator for windows
mobile 5.0

my problem is this weird exception occurring more and more when i want
to get or store data in the database:

"Es steht nicht genügend Speicherplatz zur Verfügung, um diesen
Vorgang zu beenden."
--> There is not enough memory to finish this operation.

SQL Server 2005 Mobile Edition ADO.NET Data Provider

StackTrace:
bei System.Data.SqlServerCe.SqlCeConnection.ProcessResults()
bei System.Data.SqlServerCe.SqlCeConnection.Open()
bei System.Data.SqlServerCe.SqlCeConnection.Open()
bei System.Data.Common.DbDataAdapter.QuietOpen()
bei System.Data.Common.DbDataAdapter.FillInternal()
bei System.Data.Common.DbDataAdapter.Fill()
bei System.Data.Common.DbDataAdapter.Fill()
bei
Airkom.Guard.MobileClient.ClassLibrary.DataSets.MessageDataSetTableAdapters..envelopeTableAdapter.GetEnvelopeDataByID()
....

is there anybody who can help me understand this exception?
or maybe even suggest a way to avoid it?

thanks

h.a.
 
G

Guest

How much data are you getting or storing at once when the problem occurs?
Bear in mind DataSets are very heavy/expensive which is one of the reasons I
avoid using them.

If at all possible can you provide some code as well.
 
H

henning

How much data are you getting or storing at once when the problem occurs?
Bear in mind DataSets are very heavy/expensive which is one of the reasons I
avoid using them.

If at all possible can you provide some code as well.

First thing: Thank you for replying!

Then:
It is hard to say when exactly the problem occures.
My application is using a networklayer written by fellow worker.
This layer provides the methods to get the data i need to store...
When starting the application i might get 1 set of data to store or
many many more...

My database contains 4 tables... all in all 22 colums... and one
column being a text which needs to store from 5kb up to... lets say
50kb (it needs to hold a textfile)
when receiving a "message" it can result in 1 new entry in the
database or more than 8... which are then fired one after the other...

The next thing which makes it hard to change the whole concept is the
fact that neither the database structure nor the database can be
changed significantly
to keep it similar to the layer used on the corresponding desktop
project...
this means the whole thing is more desktoporiented in its memory use
than mobile...

Is there a way to minimize the memory consumption of the DataSet?
Or is it the best way to abandon the whole thing and go back and use
hardcoded sqlstatements?
Have you encountered this problem yourself?

h.a.
 
H

henning

Sorry for beeing quiet for so long!
i solved my problem the hard way...
well it actually were kinda 2 ways...
first... i took your advise and avoided the dataset where possible...
in the end i managed to rewrite all the insert or update statements to
ease the load when writing in the db... now only the readoperations
are provided through the dataset which seems to work just fine...
the second way to make my problem subside was a presentation which had
to be done with an actual pdaphone...
after testing for hours... i did not encounter my exception once...

so this thread can be closed...
thanks again simon!
 
G

Guest

You can abanden the whole dataset to make it even for efficient. In fact the
dataset uses the DataReader to populate itself. I always use custom
collections in place of datasets.
 

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

Similar Threads


Top