Wednesday, December 07, 2005

Embedding SQL Server Express into Custom Applications along with ClickOnce Deployment

SQL Server 2005 Express Edition: Embedding SQL Server Express into Custom Applications

"This white paper discusses how to integrate and deploy Microsoft SQL Server Express-based applications by using configuration files and the ClickOnce deployment technology in Microsoft Visual Studio.

...

SQL Server Express no longer uses merge modules to embed the SQL Server Express Database Engine. Instead, it contains a single-setup executable that can be bundled with your custom application. This executable accepts command-line parameters for a smooth installation experience.

The best way to embed SQL Server Express within your application depends on how you plan to deploy the application. Ideally, you would always download the latest SQL Server Express version from the Web. This would help to ensure that your customers are running the latest version. However, it is probably more feasible to install SQL Server Express from an internal file share, or place the Express bits on the same media as your custom application.

This white paper describes the configuration file and command-line parameter support for the sqlexpr.exe setup installation executable. Because merge modules have been deprecated, configuring SQL Server Express this way is the best option for SQL Server 2005. To help you more easily embed SQL Server Express, this white paper also provides instructions for creating a wrapper class that will assist custom application developers in deploying a SQL Server Express solution. In addition, this white paper describes the advantages and disadvantages of using the ClickOnce feature of Microsoft Visual Studio 2005 to deploy your SQL Server Express custom applications.

..."


I'm becoming a big fan of ClickOnce. I've only deployed one beta with it so far, but that was so smooth, that I'm going to keep using it for future deployments.

My project didn't include SQL Express, but others might so this white-paper might come in handy in the future...

3 comments:

Phil said...

Greg,

How's that ClickOnce deployment going? Did you use it for an in-house app? Or was that beta you mentioned in your December blog posting a "for sale" product?

-Phil

Greg said...

I've used ClickOnce on a couple internal production apps and I'm fairly happy with it. It's gotten the job done and it's pretty darn easy. Though the scope of the deployment was limited to 70+ people... (Currently all my apps are either internal or OSS projects. My OSS project are all pretty recent, like my Windows Live Writer plugins, etc.)

The issues I've had with it are that there's a few things where you have to seriously jump through hoops to make happen. Like associating an extension with your app. Auto magically creating a desktop icon on install, etc. Then there's automating the publishing with team build (i.e. mage utility fun). And handling Dev to QA to Production moves...

Still all in all it's a tech that's pretty good and is usable. It's better than some of the other autoapp update methods I've used...

I look at ClickOnce as a "v2". Usable within a specific scope, but I'm looking forward to v3...

Anonymous said...

Greg,

I'm considering trying to do this with my current Windows app, written in VS2008. However, I'll be deploying this to 300 individual dealers who may need to occasionally undock their network laptops and go remote. Can I still use ClickOnce if I need to create both a NETWORK SQLEXP2005 and a LOCAL SQLEXP2005 instance?

- Kevin