//getDBUSERCursor is a stored procedure String getDBUSERCursorSql = "{call getDBUSERCursor(?,?)}"; callableStatement = dbConnection.prepareCall(getDBUSERCursorSql); callableStatement.setString(1, "mkyong"); callableStatement.registerOutParameter(2, OracleTypes.CURSOR); // execute getDBUSERCursor store procedure callableStatement.executeUpdate(); // get cursor and cast it to ResultSet rs = (ResultSet) callableStatement.getObject(2); // loop it like normal while (rs.next()) { String userid = rs.getString("USER_ID"); String userName = rs.getString("USERNAME"); }
Monday, July 23, 2012
Java call procedure and get cursor back
Wednesday, June 13, 2012
HTML5 的 cache 設定
1. Add mime type for tomcat or web server
manifest
text/cache-manifest
2. HTML file
< ! DOCTYPE h t m l >
< h t m l m a n i f e s t = " " >
3. cache.manifest
CACHE MANIFEST
CACHE:
/styles/m/mobile-css.css
/js/jquery/jquery-1.4.2.min.js
/styles/m/jquery.zweatherfeed.css
/scripts/m/jquery.zweatherfeed.min.js
/images/m/logo.jpg
/images/m/pic.jpg
NETWORK:
*
FALLBACK:
index.jsp
2. HTML file
< ! DOCTYPE h t m l >
< h t m l m a n i f e s t = " " >
3. cache.manifest
CACHE MANIFEST
CACHE:
/styles/m/mobile-css.css
/js/jquery/jquery-1.4.2.min.js
/styles/m/jquery.zweatherfeed.css
/scripts/m/jquery.zweatherfeed.min.js
/images/m/logo.jpg
/images/m/pic.jpg
NETWORK:
*
FALLBACK:
index.jsp
Wednesday, March 7, 2012
Subscribe to:
Posts (Atom)