Click to See Complete Forum and Search --> : SQL Server 2005: embedding to application


exterminator
May 24th, 2009, 05:30 AM
Just wondering, I have an application developed in .NET (Framework 3.5 SP1, Visual C# 2008) and has SQL Server 2005 as it's backend. Is it possible to have the db embedded into the application so that I can make a bundle of the application exe with the DB file and patch into a installer? Or is it that the client machine will need to have SQL Server installed?

What about SQL Server Express? Can SQL Server express be embedded? Do I need to download and install the express edition and move my backend to it to achieve what I want? Is it possible to skip download/install of express edition and have some kind of export from SQL Server 2005 full blown edition to make it compatible to SQL Server express edition?

I want the client machine to not need to download install the DB. Just would want them to have my package with my exe and db files (MDF/LDF?) and start working with it by just unzipping the package. Any hints around this would be very helpful. I am exploring the SQL Server documentation/articles but posting here to see if someone already knows and I can save some time.

Thanks very much in advance.

Alsvha
May 24th, 2009, 08:03 AM
SQL Server Express edition should be able to do what you want it to.
It should be embeddable, but I've never used it myself - so I don't know the specifics of how you do it, but it should be embeddable.

dglienna
May 24th, 2009, 04:25 PM
Compact Edition should work:

http://www.microsoft.com/Sqlserver/2008/en/us/compact.aspx

exterminator
May 25th, 2009, 12:38 AM
Ah, so the compact edition works too. I had installed SQL Server and I think Compact edition was installed too. So a follow up question (reading docs but in case you know off-hand), do I need to set up the schema and the static data I have in compact edition too (either from scratch or bcp) or can I use the current DB setup in SQL Server full-blown edition and have some kind of export to give me a compact edition compatible DB file to use with my app? I am looking for an easy way out here, slightly being lazy. :)

Thanks to both of you, Alsvha and David.

dglienna
May 25th, 2009, 12:51 AM
You should be able to back up from one to the other. I use the old version, and xferred files to SQL 2005 by exporting and importing backups. Take caution with conversions from other pc db formats. Headaches galore