Page 1 of 1

SQL Server Compact - Database File Corruption

Posted: Thu 16 Oct 2014 23:06
by jeremyw
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).

Re: SQL Server Compact - Database File Corruption

Posted: Fri 17 Oct 2014 08:34
by azyk
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.

Re: SQL Server Compact - Database File Corruption

Posted: Tue 21 Oct 2014 19:41
by jeremyw
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.

Re: SQL Server Compact - Database File Corruption

Posted: Wed 22 Oct 2014 07:55
by azyk
Please send the sample to our email (andreyz*devart*com).

Re: SQL Server Compact - Database File Corruption

Posted: Wed 07 Jan 2015 23:55
by jeremyw
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!