📄 复件 (2) dbutils.java
字号:
/*
* $Header: com.ca.eportal.db.DBUtils.java $
* $Author: IGLOBEX $
* $Revision: 1.0 $
* $Date: 2003/12/30 12:00:00 $
* $UpdateBy: zhaobin $
*/
package com.kyle.eobject;
import java.sql.*;
import net.snapbug.util.dbtool.*;
public final class DBUtils{
static{
try
{
ConnectionManager.init( "D:/DatabasePool.conf" );
ConnectionManager.debug( false );
}
catch (Exception e)
{
System.out.println("DBUtils内部错误:系统不能装载数据源: "+e.getMessage());
}
}
public DBUtils(){}
public static ConnectionPool getConnectionPool() throws Exception
{
try
{
return ConnectionManager.getConnectionPool( "testSQLServer" );
}
catch(Exception e){
throw new Exception("DBUtils内部错误:系统不能取得连接: "+e.getMessage());
}
}
/*
public static Statement getStatement() throws Exception{
try
{
return pool.createStatement();
}
catch(Exception e){
throw new Exception("DBUtils内部错误:系统不能取得连接: "+e.getMessage());
}
}
*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -