Monday, March 19, 2012

ExecuteNonQuery crash my application

I'm working on an application with Compact Framework 2 and SQL Server Mobile
2005. When the application start, if there is no data base in its folder, one
is created using CreateDataBase from SqlCeEngine (I'm sure that every object
used for that operation is closed after create the file). After that, it
pulls the data from a SQL Server 2000.
In Windows Mobile 2005, everything works fine... but when my application is
running under Windows CE 4.2, after any synchronization, if I throw any
instruction like "UPDATE" or "INSERT" (not with "DELETE") with
ExecuteNonQuery, the application crashes and exits without an error
notification. When I try to open the application without synchronization
because it's unnecessary, everything works fine. If I try to make another
synchronization, works... but then I throw another instruction with
ExecuteNonQuery, it crashes the same way.
So, my solution was to close the application everytime there is a
synchronization, but that's useless.
I've tried not to create the database with code, dropping all the tables
before the synchronization and it works... but it crashes anyway when I use
ExecuteNonQuery.
?Is there any solution for this? ?Anyone has the same problem?
I too have an application developed in .NET CF 2.0 , with SQL CE 3.0
database. I am executing the application on HP-iPAQ Win CE 4.2 device. When
there is a call to
update, and ExecuteNonQuery, the application crashes.
Synchronization is done with ADO.Net. Is there a way to resolve this?
Thanks,
Sangeetha

No comments:

Post a Comment