Posted on: 6/27/2015 10:00:11 AM | Views : 727

Hi there
I'm distributing a Windows application that uses an SQL Database. SQL 2012 Express is a prerequisite of my Setup & Deployment package. One of the first actions during deployment is to retrieve the SQL Server Name from the user installing my application, connect to the SQL Server, run a query to check if my database is created already and if not, run an SQL Script via sqlcmd to create the database.
All works fine on my development and testing computers but when distributing to end users they are getting connection errors connecting to the SQL Express server that was just installed locally. So, my question is, can I set my connection string for my initial connection to SQL Server to not have an Initial Catalog? In other words my connection string would be: Data Source=UserComputerName\SQLEXPRESS;Integrated Security=SSPI. If I do have to have an Initial Catalog can it be "master" or should it be "TempDB"? Wou ...

Go to the complete details ...