[Bug] ResultSet#getMetaData() returns null - Mailing list pgsql-jdbc

From Doug Kearns
Subject [Bug] ResultSet#getMetaData() returns null
Date
Msg-id 20030518132341.GA18771@localhost.localdomain
Whole thread Raw
Responses Re: [Bug] ResultSet#getMetaData() returns null
List pgsql-jdbc
Hello all,

ResultSet#getMetaData() is returning null, using the current CVS driver,
if called before ResultSet#next()

<snippet>
        db.setAutoCommit(false);

        CallableStatement st = db.prepareCall( "{ ? = call doit () }" );
        st.registerOutParameter(1, Types.OTHER);

        st.execute();
        ResultSet rs = (ResultSet) st.getObject(1);

        ResultSetMetaData md = rs.getMetaData();
        System.out.println( "Column count = " + md.getColumnCount() );
    //Exception in thread "main" java.lang.NullPointerException
    //at org.postgresql.jdbc2.AbstractJdbc2ResultSetMetaData.getColumnCount(AbstractJdbc2ResultSetMetaData.java:33)
    //at JDBCTest.main(JDBCTest.java:16)

        rs.next();
</snippet>

Regards,
Doug

pgsql-jdbc by date:

Previous
From: "Han"
Date:
Subject: Re: Problem about executeUpdate and stored procedure that
Next
From: "Han"
Date:
Subject: Re: Problem about executeUpdate and stored procedure that