Deployment of SQL EXpress with VB.Net program troubles
-
I am trying to deploy the ms sql express with my program and attach a mdf file automatically. I read about the attachdbfilename attribute in the connections string but I can't get it to work. Can any one give me some help? I have looked on Microsoft website and they don't give good examples. Also on Google, I am doing (I think) what I am suppose to but get errors. Example connections string: "Data Source=WALZLM1;Initial Catalog=;AttachDBFileName=scantrack.mdf;Integrated Security=True" I get this error: An attempt to attach an auto-named database for file scantrack.mdf failed. A database with the same name exists, or specified file can not be opened, or it is located on UNC share. Things you may want to know. The Sqlexpress is on a networked server. The mdf is local. What am I doing wrong?
I can't think of anything cool and nerdy to say.
-
I am trying to deploy the ms sql express with my program and attach a mdf file automatically. I read about the attachdbfilename attribute in the connections string but I can't get it to work. Can any one give me some help? I have looked on Microsoft website and they don't give good examples. Also on Google, I am doing (I think) what I am suppose to but get errors. Example connections string: "Data Source=WALZLM1;Initial Catalog=;AttachDBFileName=scantrack.mdf;Integrated Security=True" I get this error: An attempt to attach an auto-named database for file scantrack.mdf failed. A database with the same name exists, or specified file can not be opened, or it is located on UNC share. Things you may want to know. The Sqlexpress is on a networked server. The mdf is local. What am I doing wrong?
I can't think of anything cool and nerdy to say.
A database with the same name exists Have you checked this? :)
Niladri Biswas
-
I am trying to deploy the ms sql express with my program and attach a mdf file automatically. I read about the attachdbfilename attribute in the connections string but I can't get it to work. Can any one give me some help? I have looked on Microsoft website and they don't give good examples. Also on Google, I am doing (I think) what I am suppose to but get errors. Example connections string: "Data Source=WALZLM1;Initial Catalog=;AttachDBFileName=scantrack.mdf;Integrated Security=True" I get this error: An attempt to attach an auto-named database for file scantrack.mdf failed. A database with the same name exists, or specified file can not be opened, or it is located on UNC share. Things you may want to know. The Sqlexpress is on a networked server. The mdf is local. What am I doing wrong?
I can't think of anything cool and nerdy to say.
Cory Kimble wrote:
"Data Source=WALZLM1;Initial Catalog=;AttachDBFileName=scantrack.mdf;Integrated Security=True" I get this error: An attempt to attach an auto-named database for file scantrack.mdf failed. A database with the same name exists, or specified file can not be opened, or it is located on UNC share.
cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article