Re: Issue with SQL Server 2005 Mobile and SD Cards?

Tech-Archive recommends: Fix windows errors by optimizing your registry



On Sep 20, 4:07 am, "Peter Hartlén" <pe...@xxxxxxx> wrote:
Hi!

I'd say there is no perfect solution using database on SD-card, and many
people would strongly advice against it.

There are several factors that help making life easier though if you for
some reason must have your db on an external disk.

1. Make sure the device has good drivers for the SD-card. We had several
problems with this in the beginning, but our device manufacturer eventually
solved this. Problems tend to arise when the device power-ups, the
application targetting the db is running, and the card drivers problably
doesn't initialize the card fast enough.

2. Make sure you use professional cards. Cards are so cheap nowadays anyway.
We've been using SanDisk Ultra II cards quite successfully. Older/Slower
cards has shown more tendency to malfunction. As your file system seems
corrupted from time to time I sugges trying this solution first.

Anyhow, if you are targeting WM5 or later I suggest putting the SD-card on
device memory instead. IIRC WM5 has some kind of data recovery handling, so
the database should be pretty safe (I'm not 100% sure on this).

/ Peter

"adulador" <msmolin...@xxxxxxxxx> skrev i meddelandetnews:1190232761.639342.282430@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





Our application uses a database on an SD Card. We encounter strange
errors sometimes when we attempt to access it.

The errors are: 0x80004005, Description: Unspecified error; Minor = 0.

Once this occurs it never can recover. A soft reset sometimes solves
it, but not reliably.
Another observation is that after this error occurs, if you look at
the SD card in File Explorer, the file listing looks all messed up.
for example some folder and file names are,
========
Meta(====
nt="Robo.HEL
}boxboxol.wh

the file sizes are wacked out too. One said 1.58G and the card is only
512 MB.
The file system has gone corrupt or something.

Is there an issue with SQL Server 2005 Mobile and SD Cards?
Is there a setting i need to use when the DB is on an SD Card?

Environment Info:
DB: Sql Server 2005 Mobile Edition
in OLEDB C++.- Hide quoted text -

- Show quoted text -

Peter, thank you for your response.

I have implemented a couple things as you have suggested.
1. We are experimenting with high quality cards. The ones reporting
the errors were, in fact, old and slow cards.
2. I detect a wake up of the device now and before accessing the DB
again after a wake up I tear down the old connection, check for the
existance of the SD card and db file and then create a new database
connection, if all is there.
3. When a failed query with an unknow error code is detected, I
attempt the query one more time after tearing down the old conneciton,
detecting the existance of the SD card and the db file and creating a
new connection, if all is well.

We are still waiting to see the results of the above changes, to see
if it cleared up the problem.

I am also starting to wonder if there are any settings in the DB that
could be tweaked to help an SD Card based database. One in particular
I am just starting to look at is the FLUSH INTERVAL. Do you have any
advice along these lines?


.



Relevant Pages

  • Re: slow Qusnetsoft reader
    ... with database speed and with connection, ... your card periodically by chkdsk using card reader. ... problem with connection - check your newsgroup acessibility; ...
    (microsoft.public.pocketpc)
  • Re: Issue with SQL Server 2005 Mobile and SD Cards?
    ... I'd say there is no perfect solution using database on SD-card, ... Make sure the device has good drivers for the SD-card. ... doesn't initialize the card fast enough. ... We also are having major problems with SQL Server 2005 Mobile. ...
    (microsoft.public.sqlserver.ce)
  • Re: DB Corruption
    ... Our app does data collection using an integrated barcode scanner. ... those on the SD card too. ... database on an SD card, and we have always do an Open, Close and Dispose ... of the connection on each database access. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: SQL CE 3.5 and Data Loss on SD Card
    ... sure the SD card is ready before we attempt data access. ... You might consider changing the flush interval on the connection string to ... with a database on SD card I would be greatful. ...
    (microsoft.public.sqlserver.ce)
  • Re: SQL CE 3.5 and Data Loss on SD Card
    ... devices we have experienced only one corrupted SDF database. ... I attribute our success to opening a connection just before every DB access ... some code that checks to make sure the SD card is ready before attempting ... The message was checked by ESET Smart Security. ...
    (microsoft.public.sqlserver.ce)