Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: JDBC and ResultSetMetaData
On Wed, 18 Sep 2002, j_at_softdecc.com wrote:
>
> the part of our project where the problem occurs operates on an
> arbitrary resultset. Thats means, in our case, the underlying
> select-statement
> was executed with success.
>
> The part of the source code where it happens is (ResultSet is a
> correctly produced ResultSet, fields_ is an 'int', hashNames_ a
> 'Hashtable' ). The problem is: metaData.getColumnName(i) returns a
> Java 'null'
>
> - metaData.getColumnCount() returns the correct value it happens every
> - 50 or so times a (even the same) query is executed (and this method
> - is called)
>
> private ResultCursor(ResultSet result) throws SQLException
> {
> ResultSetMetaData metaData = result.getMetaData();
> fields_ = metaData.getColumnCount();
> int types[] = new int[fields_];
> for(int i = 1; i <= fields_;i++)
> {
> hashNames_.put(metaData.getColumnName(i).toLowerCase(), new
> Integer(i));
> types[i-1] = metaData.getColumnType(i);
> }
> ...
> }
>
> We have tried all thin JDBC-Drivers we could get from Oracle for 8.1.7
Can you post the query and the ddl to support the query, along with some insert statements? Not sure I can help, but I'd like to play around a bit and see if I can come up with anything.
-- Galen deForest Boyer Sweet dreams and flying machines in pieces on the ground.Received on Wed Sep 18 2002 - 20:42:11 CDT
![]() |
![]() |