Java / JDBC / Oracle Question

Pho King

Member
Sep 9, 2004
199
0
0
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?
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
In general, you should work with the javax.sql.* interfaces rather than their implementation classes. This will help with portability between JDBC providers.
 

lozina

Lifer
Sep 10, 2001
11,711
8
81
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.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
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.