Search code examples
sql-serverinstallationembeddedsql-server-expressinstallshield

Embedding SQL Server into a .NET application


Hey, I've just finished writing a VB.NET application. Now I want to package the executable and the database ofcourse into a single installer file. I tried using QSetup, InstallShield to make SQL Server embedded into the setup file, and finally after hours of try&fail I have no idea. Anyone?


Solution

  • You can do a rightmouse on the properties of your Visual Studio Setup Project, and then there is this button 'Prerequisites'. There you can tick 'SQL Server Express ...' Or the 'SQL Server Compact 3.5'

    image link to image

    You're probably best off just to set the connection file directly to the mdf, and attach it when the program is run. This is easier as it doesn't require a custom setup script to install the database to the database directory itself.

    Note: Consider using the Compact Version, it's smaller, people don't like a full blown engine on their computer :)