SQL Server Compact - Database File Corruption

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jeremyw
Posts: 32
Joined: Thu 29 Apr 2010 17:32

SQL Server Compact - Database File Corruption

Post by jeremyw » Thu 16 Oct 2014 23:06

This is an error that we've seen for years now over several versions of SDAC. I've been hoping that we would get lucky and somehow it would be caught and fixed at some point, but we are finally nearing release of this particular product.

The error message says:

Code: Select all

The database file may be corrupted. Run the repair utility to check the database file. [0, 0, 0,Database name:\\?\<UserFolder>\AppData\Local\Temp\sql9BC9.tmp,,]
<UserFolder> is my user folder. It occurs in a particular form of our software after repeatedly switching from one set of data (which is saved via multiple SQL updates/inserts) to another (which is loaded via multiple SQL queries). The odd thing is it only occurs if a certain table (involved in the data loading queries) has been populated with data from entirely separate code. Note that this only occurs with SQL Server Compact databases (which seem to be involved in a lot more bugs when used with SDAC).

The biggest problem is that I can easily reproduce it in our software, but when I try to isolate it in a simple application (to send to you), I have not been able to do so. I have already invested several hours attempting this, so I wanted to ask if we can send you our compiled code yet still have you help us debug this particular problem. We can send the source code too, but our project uses other 3rd-party components as well, making it difficult for you to recompile our code there.

We have a current support subscription, and we have also renewed our support several times over the years whenever we find bugs (usually involving SQL Server Compact). Fortunately each time in the past you have been very helpful and have quickly found and fixed these bugs. Hopefully you can help us diagnose and fix this error as well (obviously data corruption is a serious concern for us).

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: SQL Server Compact - Database File Corruption

Post by azyk » Fri 17 Oct 2014 08:34

To reproduce and investigate the problem, we need a sample without using third-party components. Please try to compose such a sample and send it to us.

jeremyw
Posts: 32
Joined: Thu 29 Apr 2010 17:32

Re: SQL Server Compact - Database File Corruption

Post by jeremyw » Tue 21 Oct 2014 19:41

Okay, it's taken several hours now, but I've stripped out other third-party components as well as most other unrelated code to create a sample application. I have zipped up the source code, so please let me know how you would prefer it sent.

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: SQL Server Compact - Database File Corruption

Post by azyk » Wed 22 Oct 2014 07:55

Please send the sample to our email (andreyz*devart*com).

jeremyw
Posts: 32
Joined: Thu 29 Apr 2010 17:32

Re: SQL Server Compact - Database File Corruption

Post by jeremyw » Wed 07 Jan 2015 23:55

Hello Devart.. :)

I emailed you a sample of this issue back in October. Andrey acknowledged that it had been received and informed me you would investigate this and let us know the results.

It's been a few months now so I wanted to follow up once again. Thanks for all your hard work!

Post Reply