connection string to connect detached database.

Oct 30 2014 12:00 PM
How to write connection string to connect detached database in Domain path C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA.Test.mdf file for windows application(Database not attached)?
 
 
Am using Connection string as this but it raise an error like
"Cannot open database "Test" requested by the login. The login failed.
Login failed for user 'sa'."
string connectionString = @"Data Source=192.168.123.123,1433;Initial Catalog=Test;Network Library=DBMSSOCN; User ID=sa;Password=Test@2014";
after restoring my bakup file, i detatch that Database then i want to access that database.
That .mdf and .ldf files are in Domain. i want to acces from my client PC.
 

Answers (2)