?? database.java
字號(hào):
package org.pan.web;
import java.sql.*;
import org.pan.util.*;
/**
* Title: 用戶登錄信息檢查
* Description:
* Copyright: Copyright (c) 2003
* Company: 多智能網(wǎng)絡(luò)有限公司
* @author: siny pan
* @version 1.0
*/
public class DataBase {
protected Connection conn = null; //Connection接口
protected Statement stmt = null; //Statement接口
protected ResultSet rs = null; //記錄結(jié)果集
protected PreparedStatement prepstmt = null; //PreparedStatement接口
protected String sqlStr; //sql String
protected boolean isConnect=true; //與數(shù)據(jù)庫(kù)連接標(biāo)識(shí)
public DataBase() {
try
{
sqlStr = "";
DBConnectionManager dcm = new DBConnectionManager();
conn = dcm.getConnection();
stmt = conn.createStatement();
}
catch (Exception e)
{
System.out.println(e);
isConnect=false;
}
}
public Statement getStatement() {
return stmt;
}
public Connection getConnection() {
return conn;
}
public PreparedStatement getPreparedStatement() {
return prepstmt;
}
public ResultSet getResultSet() {
return rs;
}
public String getSql() {
return sqlStr;
}
public boolean execute() throws Exception {
return false;
}
public boolean insert() throws Exception {
return false;
}
public boolean update() throws Exception {
return false;
}
public boolean delete() throws Exception {
return false;
}
public boolean query() throws Exception {
return false;
}
public void close() throws SQLException {
if ( stmt != null )
{
stmt.close();
stmt = null;
}
conn.close();
conn = null;
}
};
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -