Reputation: 710
I have a Windows application that works with a local database (SQL Server 2008 R2). I'm trying to create an install for my application.
I want the installer check if SQL Server 2008 R2 is available in user system, installer doesn't install SQL Server and if there isn't any version of that the installer install a new version.
But my users can't install SQL Server, so I need to install it in silent mode
Now I create a setup project in VS2010 that install SQL Server in silent mode ...
Two questions :
does the installer check for another version of SQL Server ? (I mean check if is available ...)
what will be the connection string after installing SQL Server? (if it just install one time in each PC so I can have one unique connection string in all pc)
Upvotes: 0
Views: 861
Reputation: 6123
You should set the connection string in your application as
string connectionstring ="datasource = .; Initial Catalog = |DataDirectory|\DBName.mdb;Integrated Security=SSPI
I think this connection string will work.
and if you are installing an sql sever express edition then
string connectionstring ="datasource =.\SQLExpress; Initial Catalog = |DataDirectory|\DBName.mdb";Integrated Security=SSPI;
Upvotes: 1