Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

getObject vs getString, getdate, getXXXX....

843854Mar 17 2002 — edited Mar 18 2002
Hi,

I wanna drop the following question. I wonder the difference among using a general getObject method to get values from ResultSets, either Strings, Dates or everything, versus using a particular method for each kind of data, namely getString, get Date, getInt and so on.

Actually, my web app just intends to recover data from the database and send it to the client via HTTP in session or request attributes.

Regarding that HTTP just handles Strings, would not be better using and general getObject approach and making a general data obtaining method from the ResulSet rather than particularized methods for each kind of data obtained in the ResultSet.

Does this approach has any inconvenience? Any opinions are welcome.

Please, send a copy to pelly69@hotmail.com

Cheers,

Adolfo.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 15 2002
Added on Mar 17 2002
2 comments
925 views