public static string getconnection()
{
//string db1 = System.AppDomain.CurrentDomain.BaseDirectory + "CheckExe.accdb";
//string Connection"Provider=Microsoft.ACE.OLEDB.12.0;DataSource=|DataDirectory|\\CheckExe.accdb";
string Connection = "(local);Initial Catalog=School_Sharda;Integrated Security=True";
return Connection;
}
答案 0 :(得分:1)
您错过了Date Source
密钥:
string Connection = "Data Source=(local);Initial Catalog=School_Sharda;Integrated Security=True";