金桥JAVA软件工程师教育系列教程
} { } return sta; XML_SQL_ResultSet.java package SQLBean; import java.sql.*; public class XML_SQL_ResultSet { } XML_SQL_Change.java package SQLBean; import java.sql.*; public class XML_SQL_Change { } trySQL.java import SQLBean.XML_SQL_BEAN; import SQLBean.XML_SQL_ResultSet; import java.sql.*; public class trySQL { public static void main(String[] args) { Statement sta=null; public XML_SQL_Change()throws Exception { } public void updata(String sql)throws Exception { } sta.executeUpdate(sql); sta=new XML_SQL_BEAN().getStatement(); Statement sta=null; public XML_SQL_ResultSet()throws Exception { } public ResultSet select(String select)throws Exception { } return sta.executeQuery(select); sta=new XML_SQL_BEAN().getStatement(); 16
金桥JAVA软件工程师教育系列教程
} } try { } catch (Exception e) { } e.printStackTrace(); XML_SQL_ResultSet sql=new XML_SQL_ResultSet(); ResultSet res=sql.select(\while(res.next()) { } System.out.println(res.getString(2));
17