Im running a database SQL CE Database on a SD-card. After the handheld has
been in sleep mode, and I wake it up, my application tends to crash. I have
a consistent connection to the database, i.e. I don't close the connection
until the application is terminated.
Has anyone experienced crashing applications after PocketPC 2003 has been in
sleep/suspend mode? I have tested this on 2 machines, a HHP Dolphin 9500,
and a Dell Axim X5. The Dell hasn't shown this behaviour at all (except see
Note: below), while the Dolphin tends to crash more or less instantly after
I power it up again.
Managed Exceptions:
Error Code: 80004005
Message: An internal error occurred. Unable to successfully execute disk IO
on the file system.
Minor Err.: 25051
Source: Microsoft SQL Server 2000 Windows CE Edition
Error Code: 80004005
Access to the database file is not allowed
Minor Err.: 25039
Source: Microsoft SQL Server 2000 Windows CE Edition
Note: I am not executing any I/O when the handheld is set to suspendmode.
Since I don't experience this with my Dell Axim I suspect there is something
wrong/slow in the Dolphin. Has anyone else seen this behaviour??
br,
Peter
--
This posting is provided "AS IS" with no warranties, and confers no rights.
-Chris
"Peter B" <pe...@data.se> wrote in message
news:uQI$KX$DEHA...@TK2MSFTNGP11.phx.gbl...
I don't think the time it takes for the device to re-initialize the card is
an issue. I have tried waiting for a long time and I still get the same
devastating result.
Is the power functionality different depending on make? I.e. could it be
that a Dolphin cuts the power to the SD-card entirely when going into
suspend mode while for instance the Dell Axim doesn't?
I use a single SqlCeConnection object in my database class. It is connected
at startup and I only change the CommandText property when executing
different commands. I do this since creating new connection objects all the
time is time and memory consuming. But what happens to this connection when
the device is powered off? Could this be a reason? Is there a connection
between this and the idea of the SD-card beeing totally powered off during
suspend?
I am thinking about catching a "power on"-event and reconnect the
sqlconnection to see if this solves the problem. The problem is I don't know
how I do this, do you have anything like this in your WinAPI Chris? :-)
Thanks,
Peter
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Chris Tacke, eMVP" <ctacke[at]Open_NET_CF[dot]org> wrote in message
news:eYH%23Y1$DEHA...@tk2msftngp13.phx.gbl...
--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net
"Peter B" <pe...@data.se> wrote in message
news:%23nBhiLC...@tk2msftngp13.phx.gbl...
Wouldn't it be a fair guess that Dell also powers the card port down in
sleep mode? Even if the Dell is much faster in it's card initialization I
don't think that is the entire issue... (since I have waited for a long time
as I mentioned above).
Would a reconnection of a global sqlconnection be required?
/ Peter
"Chris Tacke, eMVP" <cta...@spamfree-opennetcf.org> wrote in message
news:O7AIBTCE...@tk2msftngp13.phx.gbl...
Another example of this type of behavior is often seen with serial ports.
Some OEMs have drivers that don't do so well when you have a port open, then
do a sleep/wake cycle. The handle becomes invalid or the driver locks up.
Try opening a file on the card, performs some reads and writes, go to sleep
and wake without closing the file, then try to read and write again. That
will give you an indicator of how well the OEM did the driver. Based on
your observations, I'm betting the Dolphin fails the test and the Dell
passes.
--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net
"Peter B" <pe...@data.se> wrote in message
news:%23aVemfC...@TK2MSFTNGP09.phx.gbl...