When using the following connection string on my windows application:
sqlconnect1 = "Data Source=.\SQLEXPRESS;AttachDbFilename='" & Environment.CurrentDirectory.ToString & "Database1.mdf';Integrated Security=SSPI
I receive the following error:
An attempt to attach an auto-named database for file C:\Documents and Settings\JayDee\My Documents\Visual Studio 2005\Projects\StatPro\StatPro\bin\DebugDatabase1.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I am trying to complete my project to deploy to other workstations. Does anyone know why I receive this error?