Hi. I am trying to connect to a database but keep encountering the same error. I have a free hosting account with quantasoft (qsh.eu) who fully support SQL express user instances. I have also used the connection string generator on their site. This is the result of the error.
Cannot create file 'H:\Home\Webs\qsh.eu\transmission_24be67cf-3e4c-4852-b3ec-fc849ce5b009\www\App_Data\Database_log.LDF' because it already exists. Change the file path or the file name, and retry the operation.
Could not open new database 'transmission.qsh.eu_a45add63-33a4-4414-b09c-6880f10717b3'. CREATE DATABASE is aborted.
Cannot attach the file 'H:\Home\Webs\qsh.eu\transmission_24be67cf-3e4c-4852-b3ec-fc849ce5b009\www\App_Data\Database.mdf' as database 'transmission.qsh.eu_a45add63-33a4-4414-b09c-6880f10717b3'.
File activation failure. The physical file name "C:\Documents and Settings\James\Local Settings\Temp\VWDWebCache\ftp_transmission.qsh.eu_www\App_Data\Database_log.LDF" may be incorrect.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot create file 'H:\Home\Webs\qsh.eu\transmission_24be67cf-3e4c-4852-b3ec-fc849ce5b009\www\App_Data\Database_log.LDF' because it already exists. Change the file path or the file name, and retry the operation.
Could not open new database 'transmission.qsh.eu_a45add63-33a4-4414-b09c-6880f10717b3'. CREATE DATABASE is aborted.
Cannot attach the file 'H:\Home\Webs\qsh.eu\transmission_24be67cf-3e4c-4852-b3ec-fc849ce5b009\www\App_Data\Database.mdf' as database 'transmission.qsh.eu_a45add63-33a4-4414-b09c-6880f10717b3'.
File activation failure. The physical file name "C:\Documents and Settings\James\Local Settings\Temp\VWDWebCache\ftp_transmission.qsh.eu_www\App_Data\Database_log.LDF" may be incorrect.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[SqlException (0x80131904): Cannot create file 'H:\Home\Webs\qsh.eu\transmission_24be67cf-3e4c-4852-b3ec-fc849ce5b009\www\App_Data\Database_log.LDF' because it already exists. Change the file path or the file name, and retry the operation.
Could not open new database 'transmission.qsh.eu_a45add63-33a4-4414-b09c-6880f10717b3'. CREATE DATABASE is aborted.
Cannot attach the file 'H:\Home\Webs\qsh.eu\transmission_24be67cf-3e4c-4852-b3ec-fc849ce5b009\www\App_Data\Database.mdf' as database 'transmission.qsh.eu_a45add63-33a4-4414-b09c-6880f10717b3'.
File activation failure. The physical file name "C:\Documents and Settings\James\Local Settings\Temp\VWDWebCache\ftp_transmission.qsh.eu_www\App_Data\Database_log.LDF" may be incorrect.]
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +437
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.WebControls.Repeater.GetData() +50
System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +232
System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +53
System.Web.UI.WebControls.Repeater.DataBind() +72
System.Web.UI.WebControls.Repeater.EnsureDataBound() +55
System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +12
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360 |
------------------------------------------------------------------------------------------------------------------------------------------------------------------
When i remove the database= tag i get this
An attempt to attach an auto-named database for file H:\Home\Webs\qsh.eu\transmission_24be67cf-3e4c-4852-b3ec-fc849ce5b009\www\App_Data\Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.