没有!
import java.io.*;
import java.sql.*;
import oracle.jdbc.driver.OracleDriver;public class db implements Serializable{
static Connection conn=null;
Statement stmt=null;
ResultSet rs=null;

public static void getConnection(){
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
conn=DriverManager.getConnection("jdbc:oracle:oci8:@jimes","test","test");
}
catch(ClassNotFoundException e){
System.out.println("ClassNotFound"+e.getMessage());
}
catch(SQLException se){
System.out.println("getConnection"+se.getMessage());
}
}
public void closeConnection(){
try{
if(conn!=null)
conn.close();
if(stmt!=null)
stmt.close();
if(rs!=null)
rs.close();
}
catch(SQLException se){
System.out.println("close"+se.getMessage());
}
rs=null;
stmt=null;
conn=null;
}
public ResultSet executeQuery(String sql){
rs=null;
try{
if(conn==null)
getConnection();
if(conn!=null){
stmt=conn.createStatement();
rs=stmt.executeQuery(sql);
}
}
catch(SQLException se){
System.out.println("executeQuery"+se.getMessage());
}
return rs;
}
public boolean executeUpdate(String sql){
boolean bupdate=false;
try{
if(conn==null)
getConnection();
if(conn!=null){
stmt=conn.createStatement();
int rowCount=stmt.executeUpdate(sql);
if(rowCount!=0)
bupdate=true;

}
}
catch(SQLException se){
System.out.println("executeUpdate"+se.getMessage());
}
return bupdate;
}
public static String toChinese(String strvalue){
try{
if(strvalue==null){
return null;
}
else{
strvalue=new String(strvalue.getBytes("ISO-8859-1"),"GBK");
return strvalue;
}
}
catch(Exception e){
return null;
}
}
}