Results 1 to 1 of 1
Thread: ResultSet example
-
ResultSet example
The code snippet shows how to use ResultSet to fetch the records.
Java Code:String name, brand ; float price; ResultSet rs = stmt.executeQuery("SELECT * FROM customers"); while ( rs.next() ) { name = rs.getString("name"); brand = rs.getString("brand"); price = rs.getFloat("price"); }
Similar Threads
-
ResultSet size
By bugger in forum JDBCReplies: 18Last Post: 06-25-2011, 08:36 PM -
ResultSet to XML
By Java Tip in forum Java TipReplies: 0Last Post: 02-14-2008, 09:50 AM -
ResultSet to HTML
By Java Tip in forum Java TipReplies: 0Last Post: 02-12-2008, 09:32 AM -
ResultSet to JTable
By Java Tip in forum Java TipReplies: 0Last Post: 02-11-2008, 09:01 AM -
Empty ResultSet
By Java Tip in forum Java TipReplies: 0Last Post: 02-09-2008, 08:36 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks