Page 1 of 1

File already exists error with SQL Compact 3.5

Posted: Tue 01 Jul 2008 05:30
by cameron
I have recently downloaded 4.25.9 and when connecting to sql compact databases it gives me the error

"Database Server Error: File already exists. Try using a different database name. [0, 0, 0,File name: c:\config\dir_myob.sdf,,]"

dir_myob.sdf was created via the dbexpress driver version 4.20. (ie with version 4.2 whn you try to connect to a file that didnt exist it created it).

Now it appears that 4.25.9 does not recognise the older version of sql compact and is therefore trying to create a new database with the same name as one that already exists. (i can connect to 3.5 versions, and if no database is present it cretes a 3.5 version one for me)

if you like i can provide a copy of the sdf file for you.

Posted: Tue 01 Jul 2008 11:56
by Antaeus
I cannot reproduce this problem. Could you send us the database created with the previous version of the driver and a test application that reproduces this problem? Also specify the exact version of your IDE.

resolved - problem is with SQL compact drivers not devart's

Posted: Wed 02 Jul 2008 21:52
by cameron
while creating you a demo i found that the problem is with the SQL compact drivers and not the devart ones. the issue is due to multiple connectinos being made. an easy way to replicate it is to create 2 sql connections and connect them both simultaneously.

funnily enough this works oK for 3.5 but not for 3.1 or below. both version give an error about the file being in use however3.1 and below incorrectly try to create a new file.

Posted: Thu 03 Jul 2008 13:58
by Antaeus
> both version give an error about the file being in use
This error should appear only when the program is running under debugger.

> however3.1 and below incorrectly try to create a new file.
We have reproduced this problem and fixed it. To resolve it you should explicitly specify the provider version which should be used by the driver. You can do this with the VendorLib property of TSQLConnection. For more information see Readme.html in the DbxSda installation directory.

Posted: Fri 30 Oct 2009 22:46
by zlatan24
For work with sql files my friends usually use different trial tools.But yesterday I had the big problem with sql file.And I found in network-rebuilt mdf.Tool solved my problems in seconds and for free.Besides utility demonstrated how rebuilt mdf program analyzes your database and moves to the evaluation of affected data and corrupted mdf sql 2000.