0
SQL 연결에 문제가 있습니다. 이 내 코드SQL 연결을 만들 수 없습니다.
private static SqlConnection GetConnection()
{
SqlConnection con = new SqlConnection();
con.ConnectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=" + path + @"\App_Data\Database1.sdf;Integrated Security=True;User Instance=True";
con.Open();
return con;
}
이며,이 내가
Error: An attempt to attach an auto-named database for file \App_Data\Database1.sdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
을 얻을 것입니다 그리고 내 데이터베이스 폴더 App_Data에 위치 확신하지 무슨 잘못
경로의 값은 무엇입니까? – Mark
"path"변수에는 무엇이 들어 있습니까? –