I am developing a small IQ software using C# and SQL Server Express and I don't want to pack the whole SQL Server Express with it.. is it possible to distribute and use the mdf file only as a stand-alone data file
.NET Framework Data Access and Storage
I am developing a small IQ software using C# and SQL Server Express and I don't want to pack the whole SQL Server Express with it.. is it possible to distribute and use the mdf file only as a stand-alone data file
Hi,
That is not possible, but if you want a SQL database you can use SQL Server Compact edition:
http://www.microsoft.com/sql/editions/compact/default.mspx
The compact edition is really small (<5Mb) and do not need to be installed (you just reference the dlls)
You could also serialize your data to XML. If your application is already developped with SQL Express, the compact edition should be a relatively simple transition (assuming you did not use the advanced functionalities of SQL Server).
First you have recreate your db tables to the sql compact database.
Then, if your code uses datasets, you have to (recreate / change the mapping) to the new database.
If you use ado.net, you must change the Sql* classes to use SqlCe* classes.
Charles
do you have any good resources and samples
The SDK has all the information:
Charles