Backup/DBConnection.cs
(完整代码) 859Busing System;
using System.Web;
using System.Web.Caching;
using System.Data.OleDb;
namespace _211
{
/// <summary>
/// DBConnection 的摘要说明。
/// </summary>
public class DBConnection
{
public DBConnection()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
//5 1 a s p x.com
public static string getConnStr()
{
if(HttpContext.Current.Cache["conn"]==null)
{
HttpContext.Current.Cache.Insert("conn", "data source="+HttpContext.Current.Server.MapPath("DB_51aspx/db.asax").ToString()+";provider=microsoft.jet.oledb.4.0");
}
return HttpContext.Current.Cache["conn"].ToString();
}
public static OleDbConnection getConn()
{
return new OleDbConnection(getConnStr());
}
public static OleDbConnection getConn(string ConnStr)
{
return new OleDbConnection(ConnStr);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
