Salut a tous
J'ai une base de données et une application. lorsque j'exécute l'erreur suivant apparue.
An attempt to attach an auto-named database for file C:\Programmes\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Gestion_Contact.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Description : Une exception non gérée s'est produite au moment de l'exécution de la demande Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code.
Détails de l'exception: System.Data.SqlClient.SqlException: An attempt to attach an auto-named database for file C:\Programmes\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Gestion_Contact.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Erreur source:
Ligne 6964 : this.Adapter.SelectCommand = this.CommandCollection[0];
Ligne 6965 : ContactDataSet.StatusDataTable dataTable = new ContactDataSet.StatusDataTable();
Ligne 6966 : this.Adapter.Fill(dataTable);
Ligne 6967 : return dataTable;
Ligne 6968 : }
Fichier source : C:\Users\user\Desktop\Gestion contact\Gestion contact\Gestion contact\ContactDataSet.Designer.cs Ligne : 6966
lorsque je fait la test de connexion est reussite et la chaine de connexion et la suivante
Data Source=DEV1-PC;Initial Catalog=Gestion_Contact;User ID=sa
et dans le fichier de web.config
<connectionStrings>
<add name="Gestion_ContactConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Programmes\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Gestion_Contact.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
comment je veux résoudre mon problème Aidez moi s'Il vous plais......
Partager