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 question: Execute procedure with plain SQL?

Re: JDBC question: Execute procedure with plain SQL?

From: Joe Weinstein <joeNOSPAM_at_bea.com>
Date: Tue, 29 Mar 2005 09:26:00 -0800
Message-ID: <42498FA8.8060202@bea.com>

Hexathioorthooxalate wrote:

> Lookup "java.sql.CallableStatement"
> 
> Regards
> Hex

Hi, and thanks, but... A callable statement *is* a prepared statement, but only necessary if we have output parameters. As originally stated, for the current case I can only use a plain statement to execute a procedure. So the question is whether there is any SQL string that a plain statement can send to the DBMS to execute a procedure. Joe

> "Joe Weinstein" <joeNOSPAM_at_bea.com> wrote in message 
> news:4249850a_at_news.beasys.com...
> 

>>Hi all.
>> I know that PreparedStatements are the correct means for executing a
>>stored procedure,
>>but in my current case I am limited to a plain Statement object. Is there
>>a SQL string that
>>would allow a plain statement to execute a simple non-parameterized
>>procedure? Eg:
>>
>>Statement s = con.createStatement();
>>s.execute("execute myProcedureName" );
>>
>>This doesn't work like SQL-PLUS... The driver just sends the "execute
>>myProcedureName"
>>to the DBMS and then it fails with a ORA-00900: invalid SQL statement.
>>
>>Thanks,
>>Joe Weinstein at BEA
>>
> 
> 
> 
Received on Tue Mar 29 2005 - 11:26:00 CST

Original text of this message

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