power question

  • Thread starter Thread starter David caso
  • Start date Start date
D

David caso

hi,

i've developing an app for Compact Framework 2.0 and windows mobile 5,
i've been using an SQLserverCe, and the problem comes when i switch the
power off, and later i put the power on, in that moment, i try to open a
form witch doesn't open before (in the form i haven't using database
connection, only have a labels and buttons), then the app doesn't work,
and i'cant kill the process, i need reset the device.
if the form have already opened before, the form open without problems.
have anyone an idea to resolve that?

thanks
 
I'm going to guess your app and/or DB are on a mounted storage volume. If
that's the case, that volume is unmounted in power off, so it's like pulling
it out. When you power on, it gets re-mounted but the system and the app
have no way of knowing the newly inserted volume is the same as the old, so
all handles are invalid. That means open DB handles are invalid. The app
itself may try to page in more data from its old handle and fail.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com
 
thanks, now i put my app in a Storage memory, and the other files of
app, such as DB, config files, images, logs, etc, in the SD card, and i
check from a DB's class the errors, and when i found a expecific error,
the app try to close the previous connection to db, and open a new
connection to db, before make any operation to db.
But when the db return to me an error, is only when i try to do an
update or insert, if i launch a select, the db doesn't return to me any
error,nevertheless, even some updates do not give mistake, the insert
stament always give mistake.
And the error which return to me is "Unspecified error", and not give me
anymore error.
Now the forms not opened before, they open correctly

i think that with those things the app works fine, now i'm trying to
broke the app, and i can't crash it.


thanks
 
Back
Top