Deploying VB.net application with .MDF file (sql server 2008) + ClickOnce

I am trying to deploy a VB.net application that is currently using SQL Server 2008 as the database to connect to.

I need this application to be able to include a copy of my data so that wherever I install the application, there is no need to install SQL Express.

What I read was that I had to use SQL Server Compact Edition for this. Is there a way I can do this using a .MDF file?

If not, is it possible to convert the .MDF file to .SDF and then just include it in my vb.net application?

thank you

+4
source share
2 answers

SQL Server CE is redistributable. SQL Server 2008 is not working.

The dificulty change level for SQL Server CE will depend on things like the stored procedures used (maybe yes). This is usually not trivial.

But SQL Server 2008 Express is redistributable and free, and, apart from a few size restrictions, it’s essentially the same as the full SQL Server 2008. Significant limitations:

  • 1 processor socket
  • 1 GB of memory
  • 10 GB of user data for each database (version R2) (previously 4 GB)

If there are multiple instances of your application connecting to the central server, you should go with SQL Server 2008 Express. SQL Server CE is a built-in in-memory database, Express works as a standalone service.

+1
source

SQL CE can be deployed in your application directory with zero provisional size.

However, when migrating from SQL Server, you will have to remember that you may miss some useful properties that you may or may not use (such as stored procs and some of the new data types). Depending on the data access structure, you will also need to change some architecture (for example, the Entity Framework requires a slightly modified SSDL).

From the point of view of creating a schema (and possibly some scripts) from SQL Server (Express) to a SQL CE compatible script, you can see http://exportsqlce.codeplex.com/

+1
source

All Articles