Suspend mode and application handle

I

intelinside

Hi to all,

scenario:

an application written in CF 3.5 with SQL Compact edition 3.5.
Both application and SDF file (database file) are located on a SD CARD
(\STORAGE CARD).

When i power off the device and then power on the application exit
with no error.

Probably the main application lose handle.

I tried to use RequestPowerNotifications and trap the SUSPEND event:
my application trap this state, try to close and reopen sql connection
but the application exit withous error.

Please help me
 
C

Carsten Unterberg

Hey,

you should be really careful with database on SD-cards. I tried it in former times. Everything seems to be OK, but sometimes there is definitely a moment or a behavior which you never expected... and the BANG. The sdf-file is corrupted and not repairable.

You should store the sdf-file not on the SD-card.

Carsten Unterberg | Test-Framework

"intelinside" <anton
 
A

Alberto Silva - Microsoft MVP - Device Application

Hi,
On which device model does it happen? Have you tried with diferent devices?
Most current Windows Mobile devices handle correctly such situations, even
if for some particular models a specific setting, registry editing or ROM
upgrade may be necessary.

That particular situation has to do with the way the storage card power
management is handled and the time needed to mount the volume again. BTW,
beware that such situations may lead to corrupted databases.

--

Alberto Silva
www.moving2u.pt - R&D Manager
http://msmvps.com/AlbertoSilva - Blog
Microsoft MVP - Device Application Development
 

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

Top