Results 1 to 4 of 4
- 12-05-2008, 06:50 AM #1
Member
- Join Date
- Dec 2008
- Location
- Mexico
- Posts
- 10
- Rep Power
- 0
Either ResultSet or a specific object?
Hello. I have this doubt... When querying a DB through JDBC, should I take the data directly from the ResultSet and into the GUI or should I create an object, fill that object with the data from the ResultSet and then use the object to fill the GUI.
Which would be the criteria to choose from one or the other approach?
Thanks a lot.
- 12-05-2008, 08:00 AM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
A ResultSet should not live beyond the retrieval from the DB and all DB resources should be closed ASAP. Now, knowing this, which is better?
- 12-05-2008, 09:15 PM #3
Member
- Join Date
- Dec 2008
- Location
- Mexico
- Posts
- 10
- Rep Power
- 0
Stated that (masijade's reply), I suppose copying the data from the ResultSet to a specific object (please correct me if I am wrong).
About closing all DB resourses ASAP after DB retrieval... does that include the Connection and Statement objects?
- 12-06-2008, 07:41 AM #4
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
Similar Threads
-
how do i print a specific txt file on a specific printer
By nikhilbhat in forum New To JavaReplies: 2Last Post: 11-08-2008, 10:40 AM -
Open specific folder form JSP
By roseline43 in forum New To JavaReplies: 2Last Post: 09-02-2008, 07:53 PM -
Select specific cell
By Echilon in forum New To JavaReplies: 1Last Post: 01-01-2008, 07:47 AM -
Rejecting connections from a specific IP
By javaplus in forum NetworkingReplies: 2Last Post: 12-21-2007, 02:28 PM -
How to cast an Object into a specific type (Integer/String) at runtime
By mailtogagan@gmail.com in forum Advanced JavaReplies: 2Last Post: 12-03-2007, 01:04 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks