I have a VB.net application with a SQL Express DB. Today I'm distributing the DB with the application. This is fine until the user wants to upgrade to a later version when my DB will replace the allready existing DB of the user (with all his data).
So I thought I'd script the DB with the values that I want in some tables if there is no database present when the user starts the app. Here is were I get into trouble. I use a connectionstring with "AttachDbFilename=|DataDirectory|dbname.mdf" How do I check if it allready exists? And what also occured to me, if the user allready have an SQL Server installed and named it other than SQLEXPRESS, how will I find it?
Anyway I would be grateful for any advice on this topic.