连接数据库
来源:互联网 发布:毕向东的java视频教程 编辑:程序博客网 时间:2024/06/07 12:12
public clsDataBaseLayer(string strConnect, string dataType)
{
if (dataType.ToUpper() == "ORACLE")
{
this.ConnectionString = Get_ConnectionString(strConnect);
}
else
{
this.ConnectionString = strConnect;
}
this.DbType = dataType;
}
public clsDataBaseLayer()
{
try
{
this.dbType = ConfigurationSettings.AppSettings["DataType"];
if (this.dbType.ToUpper() == "ORACLE")
{
this.connectionString = Get_ConnectionString(ConfigurationSettings.AppSettings["ConnectionString"]);
}
else
{
this.connectionString = ConfigurationSettings.AppSettings["ConnectionString"];
}
}
catch (System.Exception ex)
{
throw new Exception(ex.Message);
}
}
{
try
{
this.dbType = ConfigurationSettings.AppSettings["DataType"];
if (this.dbType.ToUpper() == "ORACLE")
{
this.connectionString = Get_ConnectionString(ConfigurationSettings.AppSettings["ConnectionString"]);
}
else
{
this.connectionString = ConfigurationSettings.AppSettings["ConnectionString"];
}
}
catch (System.Exception ex)
{
throw new Exception(ex.Message);
}
}
阅读全文
0 0
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 连接数据库
- 将本地项目托管到远程github上管理
- 【NOIP2014】【洛谷1941】【CJOJ1672】飞扬的小鸟
- Java实现简易聊天软件_类QQ(含课程论文、实施计划书、演示视频、答辩PPT、源代码及运行环境)
- React-Naitve 百度地图配置教程
- leetcode[First Bad Version]//待整理多种解法
- 连接数据库
- JVM参数优化
- hdu 4857 逃生 反向拓扑排序+优先队列
- leetcode[Move Zeroes]
- DATATIME 加 5秒钟
- tcp
- Vivado Logic Analyzer中VIO核的使用
- git clone 下来的文件和github上的不一样
- Spring Batch学习记事