Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To start with, and MDF file can be read only by an instance of SQL Server. If you deploy MDFs, then your application must either connect to a SQL Server provided by your end-user during setup, or it must deploy its own instance, in the later case a SQL Server Express Edition instance. See <a href="http://msdn.microsoft.com/en-us/library/ms143722%28v=sql.90%29.aspx">How to: Install SQL Server Express</a>. With Visual Studio 2008 you can add a prerequisite to your own application setup MSI, see <a href="http://blogs.msdn.com/b/sqlexpress/archive/2008/09/12/faq-installing-the-sql-server-2008-express-clickonce-bootstrapper-for-visual-studio-2008-sp1.aspx">"Installing" the SQL Server 2008 Express ClickOnce Bootstrapper for Visual Studio 2008 SP1</a>.</p> <p>A second issue is that, despite the wide belief of the contrary, distributing the MDF alone without the LDF can land you into a world of pain. You can end up distributing an inconsistent MDF that needs the LDF to finish recovery and get into a consistent state. </p> <p>But a more serious issue is your plan to deploy binaries (MDFs) instead of scripts for database deployment. This is doomed to fail. As soon as you'll plan to release v. 1.1 of your application you'll face the non-trivial problem of how to replace the user MDF (which now contains data added by the user) with your new MDF. This is why is much much better to deploy <a href="http://rusanu.com/2009/05/15/version-control-and-your-database/">upgrade scripts</a> always, and forget about the MDF in your project.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload