筆記:簡單五步使用JDBC RowSet
(Notes:Easily using JDBC RowSet with 5 steps)
1. new CachedRowSertXImpl()
CachedRowSetXImpl tuserRowSet = new CachedRowSetXImpl();
2. .setDataSourceName()
tuserRowSet.setDataSourceName("java:comp/env/jdbc/some_DatatSrc");
3. .setCommand() //specify SQL command here
tuserRowSet.setCommand("select * from table");
4. tuserRowSet.setTableName()
tuserRowSet.setTableName("TUser");
5. query
tuserRowSet.executeQuery();
沒有留言:
張貼留言