• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Java / JDBC / Oracle Question

Pho King

Member
I did a few searches on this but I haven't been able to get a definitive answer. What's the difference between the ResultSetMetaData class and the OracleResultSetMetaData class. I know that the Oracle class implements the ResultSetMetaData class, but I don't see any clear advantages.

Can anyone help me out?
 
In general, you should work with the javax.sql.* interfaces rather than their implementation classes. This will help with portability between JDBC providers.
 
Originally posted by: Pho King
If I know that I will only be using an Oracle database, what's the advantage?

In some cases, like if you are doing some extreme number of transactions you can use Oracle specific batching features and can make quite an improvement in performance. But for 99% of apps out there they'll never really see the benefit of using such features.
 
Err, ResultSetMetaData is an interface, not a class. Assuming this is the type that oracle's driver will always give you from ResultSet.getMetaData(), then there should be no difference at all except that you need an extra (useless) cast to use the oracle version. It doesn't look like there are any additional methods provided.
 
Back
Top