package com.dao;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
public class SuperDAO {
protected Connection conn=null;
protected PreparedStatement stmt=null;
protected ResultSet rs=null;
public void destory()
{
try
{
if(rs!=null)
{
rs.close();
rs=null;
}
if(stmt!=null)
{
stmt.close();
stmt=null;
}
if(conn!=null)
{
conn.close();
conn=null;
}
}
catch(Exception e)
{
System.out.println("无法清除缓存");
}
}
}
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
public class SuperDAO {
protected Connection conn=null;
protected PreparedStatement stmt=null;
protected ResultSet rs=null;
public void destory()
{
try
{
if(rs!=null)
{
rs.close();
rs=null;
}
if(stmt!=null)
{
stmt.close();
stmt=null;
}
if(conn!=null)
{
conn.close();
conn=null;
}
}
catch(Exception e)
{
System.out.println("无法清除缓存");
}
}
}