asp.net sql 数据库处理函数命令

2019-05-11 20:16:03刘景俊

{
throw;
}
finally
{
conn.Close();
}
}

.配置

public class DBH
{
private DBH() { }
private static readonly string _DBA = ConfigurationManager.ConnectionStrings["DBA"].ConnectionString;
public static string DBA
{
get { return _DBA; }
}
}

附: configurationManager 需要命名空间 using System.Configuration 和添加引用System.Configuration 双重操作。