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

Home -> Community -> Usenet -> c.d.o.server -> Re: JDBC execute statement with Brackets - NullPointerException

Re: JDBC execute statement with Brackets - NullPointerException

From: <joeNOSPAM_at_BEA.com>
Date: 22 Jan 2007 14:29:28 -0800
Message-ID: <1169504968.487284.181180@51g2000cwl.googlegroups.com>

On Jan 22, 2:19 pm, Olivier Guyot <olivier.guy..._at_free.fr> wrote:
> Hi,
>
> I am trying to create Through JDBC Connection a Java Source Stored
> procedure.
>
> I get a Null Pointer Exception on
>
> Statement.executeUpdate()
>
> aused by: java.lang.NullPointerException
> at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java:870)
> at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:952)
> at
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
> at
> oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1614)
> at
> oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1579)
>
> I found nothing on metalink, just a message on a post :
>
> http://www.minq.se/forum/thread.jspa?threadID=1518&tstart=60
>
> Telling that it is impossible to have statement whith {}. It is not well
> interpreted (thinking { call PKG.FUNCTION }
>
> If somebody has an idea, telle me.
>
> Regs,
>
> Olivier

Hi. Don't call executeUpdate() or executeQuery(), just call execute(). Oracle can't return 'inline' result sets for executeQuery()'s mandated ResultSet return value, and executeUpdate() wants to return a row count of the number of rows affected by an update. Execute() will do everything, and afterwards you can process any returns. Joe Weinstein at BEA Systems Received on Mon Jan 22 2007 - 16:29:28 CST

Original text of this message

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