Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> JDBC metaData.getColumns( ......

JDBC metaData.getColumns( ......

From: <greenemcg_at_my-dejanews.com>
Date: Mon, 24 May 1999 23:29:35 GMT
Message-ID: <7icncs$oqs$1@nnrp1.deja.com>

I have the following piece of code (works in sybase, new to
oracle) All I want to do is get some properties of the Columns.

After successfully connecting to the Database my result set is
null. Is there any-example code that successfully retrieve the
Column data


 MetaData metaData = connection.getMetaData();

ResultSet rs = metaData.getColumns( null,

                                     null,
                                    tableName, //
name of table
                                    "%");

 while( rs.next() ) {
  String columnName = rs.getString( "COLUMN_NAME" );
  String typeName = rs.getString( "TYPE_NAME" ); }



Using thin driver

Database version : Oracle8 Enterprise Edition Release 8.0.4.0.0 -
Production
PL/SQL Release 8.0.4.0.0 - Production
Driver Name : Oracle JDBC driver
Driver Version : 8.0

Thank You Michael Greene

--== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.--- Received on Mon May 24 1999 - 18:29:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US