Results 1 to 3 of 3
- 03-23-2009, 12:22 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 5
- Rep Power
- 0
How do I put a ResultSet in an Object?
Hi!
I have put a query from sql server 2005 in a result set:
rs = st.executeQuery("select * from category ");
where rs is a ResultSet and st is Statement.
Now I have to put the resultset in an Object[][] in order to use it in a JTable.
How can I do that?
Since now, Thanks!
- 03-23-2009, 03:38 AM #2
Senior Member
- Join Date
- Dec 2008
- Location
- Hong Kong
- Posts
- 473
- Rep Power
- 5
Object[][] should store the data fetched, not the whole ResultSet object
use rs.getXXX(int/String) to get the data in the result
- 03-31-2009, 11:40 PM #3
Member
- Join Date
- Mar 2009
- Posts
- 5
- Rep Power
- 0
Similar Threads
-
Operator < cannot be applied to java.lang.Object, Object
By Albert in forum Advanced JavaReplies: 2Last Post: 11-26-2010, 02:12 AM -
how to pass an arraylist from an object back to the parent object that it was created
By george_a in forum New To JavaReplies: 1Last Post: 03-04-2009, 06:14 PM -
Either ResultSet or a specific object?
By saul_2110 in forum JDBCReplies: 3Last Post: 12-06-2008, 07:41 AM -
Parsing a superclass object to subclass object dynamicly
By Andrefs in forum Advanced JavaReplies: 1Last Post: 07-22-2008, 04:27 PM -
Help with Resultset
By xxAlemanxx in forum JDBCReplies: 6Last Post: 06-24-2008, 11:09 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks