Need realy help! Nobody there who knows a solution for my memory-error on WM5??



Hello!

This is my second try.

It's very important for me to resolve this problem. Otherwhise I have
to switch the program to an other progamming-language. Which would be
a havy work without knowing if there are other problems I can't solve.

I create a PPC-Program in c#

my Objects conEnceDB, cmd and dr are placed in my Form1

namespace enceAblesung3
{
public partial class Form1 : Form
{
private SqlCeConnection conEnceDB = new SqlCeConnection();
private SqlCeCommand cmd;
private SqlCeDataReader dr;


to open the Database my connection string is

conEnceDB.ConnectionString = ´´Data Source=my.sdf;Max Buffer
Size=4096;´´;

in my several methods i execute my sql-statements in the following
way:

selecting:

cmd.CommandText = sSqlString;
dr = cmd.ExecuteReader();
while (dr.Read())
{
.....
}


update, insert and delete

cmd.CommandText = sSqlString;
cmd.ExecuteNonQuery();

After several executions (20-50) i get the error: insufficient memory
for this operation

When i Catch the error and try the execution is a second time the
error is the same.

To set the Max Buffer Size to 4096 don´t help realy. I think the times
of ok executions bevor getting the error are a little bit higher.

Funny is:
When i leaf my program by switching to an other by using the
hardwarebuttons and come back by closing the new modul i have no
memory error for the next 20-50 statements.

So i think that there must be an error in the memory manager.
What is your opinion of this? And is there any idea to fix this
problem.

I can reproduce the error only on PPCs with Mobile5. On Windows Mobile
2003 the Programm seems to working fine.

Greeings from Gemany
René

PS: I hope my english is not to bad to understand my problem. When
anything is not clear, please ask for better description. I havn't
find a working solution in the web (google), so it is my last
possibility to resolve this problem.

.


Loading