Using an Embedded SQL Express Database

Click Once

Mike Wachal has done some excellent work discussing how to embed a SQL Express

database into an application for use with click once.  In his approach, the mdf file is packaged as an application resource and is copied to the application directory by the application at run time.  Later versions of the application are deployed with update transact SQL scripts that are then run by the application against the local copy of the embedded database to install changes.  This avoids the problem where you overwrite a user's prior data each time an application is updated.  Check out Mike's blog at SQL Express Blog.  A link to the web cast can be found at SQL Express Weblog

More information on Click Once is at...

Click Once deployment on MSDN

 

User Instances

From my background using SQL Server in an Enterprise environment I had no frame of reference for understanding user instances, so I found this SQL Express User Instances on MSDN very helpful. This is a highly recommended read if you're trying to use SQL Express in an embedded application.  It explains the connection string argument AttachDbFilename which makes it possible to connection to a database file in the current application's directory.  Using this statement also requires administrator access unless you use the User Instances feature which is also discussed at length.

 

Detecting SQL Express

This Whitepaper also contains code showing how to detect whether SQL Express is installed and tips on how to get it installed.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: mcstar
Posted on: 8/29/2008 at 1:45 PM
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



Tag cloud

    About the author

    I've been a software desinger and developer for over ten years, for the last 8 I've worked in corporate IT.  Recently I've become aware that my youthful desire to program has been suppressed by the needs of my job.  Originally, I had an intense desire to design more intelligent solutions and this desire spurred me to learn to program.  Early on, it was my interest in AI that got me in to the software industry, but due to the demands of Corporate IT, much of the work I acutally do tends to be in the UI/CRUD/Framework area.  This blog is intended to focus discussion about the use of Artificial Intelligence programming techniques and algorithms in the business world.

    It's apparent to me that more intelligent designs could go a long way towards assisting users in making faster, better decisions.  How though do we integrate AI algorithms into the coporate world?  How can we get users used to interacting with smarter algorithms?  Much of what IT programming does today is centered around displaying and editing data.  Can we build Intelligence into our frameworks that is more aware and capable of delivering data in more useful ways?  Can we build Intelligence into capacity and load planning that will prevent the kinds of failures systems are prone to under heavy use? 

    This blog will explore these ideas and discuss AI that is actually in use in various business applications.

    Page List