Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Exception with SQLCe on Emulator

0 views
Skip to first unread message

henning

unread,
Oct 4, 2007, 7:58:21 AM10/4/07
to
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.

Simon Hart [MVP]

unread,
Oct 7, 2007, 9:58:01 AM10/7/07
to
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.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


"henning" wrote:

> 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()
> ....

henning

unread,
Oct 8, 2007, 7:38:09 AM10/8/07
to
On Oct 7, 3:58 pm, Simon Hart [MVP] <srhart...@yahoo.com> wrote:
> 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.
> --
> Simon Hart
> Visual Developer - Device Application Development MVPhttp://simonrhart.blogspot.com
>

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.

henning

unread,
Oct 25, 2007, 8:58:35 AM10/25/07
to
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!

On Oct 7, 3:58 pm, Simon Hart [MVP] <srhart...@yahoo.com> wrote:

> 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.
> --
> Simon Hart

> Visual Developer - Device Application Development MVPhttp://simonrhart.blogspot.com


>
> "henning" wrote:
> > 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 weirdexceptionoccurring 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.
>

> >SQLServer 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()

Simon Hart [MVP]

unread,
Oct 25, 2007, 3:13:00 PM10/25/07
to
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.
--
Simon Hart

Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com
0 new messages