SQL:

using System.Data.SqlClient;

string sql = "server=.;uid=sa;pwd=;database=tablename;";


ACCESS:

using System.Data.OleDb;

string sql = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" + HttpRuntime.AppDomainAppPath + "//App_Data//db.mdb";

 HttpRuntime.AppDomainAppPath  为根目录 

 

相关文章:

  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
  • 2021-10-13
  • 2021-07-05
  • 2022-02-13
猜你喜欢
  • 2022-02-07
  • 2021-06-29
  • 2021-09-08
  • 2022-12-23
  • 2021-07-16
  • 2022-12-23
相关资源
相似解决方案