unable to open mdf file from another disk drive

karan khokhar

New member
Joined
Jun 20, 2010
Messages
4
Programming Experience
Beginner
SQLConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename= e:\new\xyz.mdf;Initial Catalog= xyz;Integrated Security=True;User Instance=True"

im new to sql server.im trying to open an mdf file ,my program works flawlessly if the mdf file is located on e: drive but if i copy the contents of e:\new into c:\new and replace e:\new\xyz.mdf with c:\new\xyz.mdf it throws an error


A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll


i cant understand why it wont open the database on c drive ?my VB express is installed on e drive (if that helps)
 
Back
Top