" An attempt to attach an auto-named database for file D:\WebBilling\WebBilling\bin\Debug\databilling.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. "
You are trying to attach a DB to SQL: this only works with development systems, production versions of SQL Server do not support the ATTACH command so it's a poor idea in most cases anyway (ATTACH is a special debug version which spins up a "new instance" of SQL to prevent damage to other DBS). When you attach a DB, it can't have the same name as an existing file: the reasons for that are obvious. When you attach a DB, it must be in a folder to which the SQL agent has full access - it does not run under your user id, so it can't access your "private" user files. When you attach a DB, it has to be located on the same computer as the SQL instance you are attaching to: you cannot specify a path to a different physical computer (as there is no guarantee to SQL that the remote location will be available when it needs it).
So look at your connection string, and work out which of those is relevant.
Error 38 Unable to apply a change while debugging. Source file 'C:\Users\pc\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs' was reloaded. You must restart the debugging session.
An attempt to attach an auto-named database for file D:\WebBilling_new\setup\bin\Release\test.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Rafnas T PPosted Jul 6, 2017, 2:22 AM
Abhilash J APosted Jul 6, 2017, 3:11 AM
When you attach a DB, it can't have the same name as an existing file: the reasons for that are obvious.
When you attach a DB, it must be in a folder to which the SQL agent has full access - it does not run under your user id, so it can't access your "private" user files.
When you attach a DB, it has to be located on the same computer as the SQL instance you are attaching to: you cannot specify a path to a different physical computer (as there is no guarantee to SQL that the remote location will be available when it needs it).
So look at your connection string, and work out which of those is relevant.
Jyoti JodhaPosted Jul 6, 2017, 2:35 AM
Rafnas T P
Jyoti JodhaPosted Jul 6, 2017, 12:43 AM
Unable to apply a change while debugging. Source file 'C:\Users\pc\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs' was reloaded. You must restart the debugging session.
Jyoti JodhaPosted Jul 6, 2017, 12:18 AM
Abhilash J APosted Jul 5, 2017, 11:38 AM