Connection string
-
connectionString1 = @"
server = .\sqlexpress;
integrated security = true;
database = C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\NORTHWND.MDF;
user instance = true";connectionString2 = @"
server = .\sqlexpress;
integrated security = true;
database = northwind";connectionString1 is working fine and connectionString2 is giving the message "Cannot open database northiwnd. login failed for user XYZ". Can someone tell me whats the difference
-
connectionString1 = @"
server = .\sqlexpress;
integrated security = true;
database = C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\NORTHWND.MDF;
user instance = true";connectionString2 = @"
server = .\sqlexpress;
integrated security = true;
database = northwind";connectionString1 is working fine and connectionString2 is giving the message "Cannot open database northiwnd. login failed for user XYZ". Can someone tell me whats the difference
humayunlalzad wrote:
atabase = C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\NORTHWND.MDF;user instance = true";
humayunlalzad wrote:
database = northwind";
The difference lies in the
user instance = true
part of the sql. Read about user instances here.My signature "sucks" today
-
humayunlalzad wrote:
atabase = C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\NORTHWND.MDF;user instance = true";
humayunlalzad wrote:
database = northwind";
The difference lies in the
user instance = true
part of the sql. Read about user instances here.My signature "sucks" today
@"
server = .\sqlexpress;
integrated security = true;
database = northwind;
user instance = true";I am sorry I should have mentioned before hand, that even the above string with "user instance = true" added is not working