Re: JVM & JDBC Upgrade --- Help !!

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JVM & JDBC Upgrade --- Help !!
Date: 2011-09-22 04:25:48
Message-ID: 4E7AB8CC.2000600@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On 09/22/2011 06:53 AM, Craig Golby wrote:
>
> Code Snippet ...
>
> if(conn != null)
>
> { try
>
> { pStmt = conn.prepareStatement(stmtStringSel);
>
> pStmt.clearParameters();
>
> rsID = pStmt.executeQuery();
>
> //Set up the Array
>
> ResultSetMetaData rsmd = rsID.getMetaData();
>
> int columnCount = rsmd.getColumnCount();
>
> int rowCount = 7;
>
> rsOpened = new String[rowCount][columnCount];
>
> int r=0;
>
> while(rsID.next())
>
> { int c=0;
>
> int rsc=1;
>
> while (rsc <= columnCount)
>
> { rsOpened[r][c] = rsID.getString(rsc);
>

Is the above line where the exception is thrown from? You didn't provide
full exception context.

If so, check and make sure the column count reported by `getColumnCount'
matches what you expect and what the old driver provided. Compare it to
the table. Compare the column-list metadata output from the old and new
drivers to see which column(s) have appeared/disappeared.

--
Craig Ringer

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message alexbruy 2011-09-22 09:01:25 Prepared statement with function as argument: how to bind values?
Previous Message Craig Golby 2011-09-21 22:53:25 JVM & JDBC Upgrade --- Help !!