Ok so I’m developing a WPF application that makes heavy use of SQL Server.
I’ve been asked to create an installer package that checks whether the client already has SQL Server Express 2005 already installed, his operating system (64bit Vs x86) and install the required SQL Server instance if needed.
I’m then required to automatically map my App.config’s connection string to the SQL Server’s connection string and run a script to create my database.
Is it just me, or does this look like a lot of hard work?
Any idea where to start?
Edit:
Ok should I move to SQL Server Compact edition?
Thanks!
No it is not just you, this will be a lot of work! It is also incredibly difficult and time consuming to get right.
A common approach to this problem i.e. having large system dependencies, is to have the dependency (in this case SQL server) as a “pre-requisite” to installing your software. Your installation package checks to see if the dependency is installed, and if it isn’t, advises the user that it needs to be in place before installing your software. If the dependency does exist, then your package can go through the steps of installing your schema into it.
The onus is then on the user, or the systems administrator\IT, to get the dependency set up. This may even be required as the user may not have privileges to install something like SQL server. The user may even want to use a shared database i.e. not on their local machine. Not sure what your circumstances are…