| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.oracle -> Re: SP call does not work
"Virgil Green" wrote...
> Bjorn Abelli wrote:
> > CallableStatement cs =
> > con.prepareCall
> > ("{call schtru.sp_get_all_descr (?, ?, ?, ?)}");
> Are these opening/closing parentheses required by Oracle?
Yes.
AFAIK, that's the standard syntax "inherited" from the similar constructions in ODBC.
> I never use them with SQL Server. A review of the CallableStatement
> interface docs gives no indication that the parentheses are needed.
That's because it's up to the vendor how they have implemented it. If you have an OracleConnection, the CallableStatement is actually an OracleCallableStatement.
If you're familiar with PL/SQL in Oracle, you also know how local variables are used. That syntax is also allowed for the SQL-string as an alternative for the questionmarks.
http://database.sarang.net/database/oracle/jdbc/jdbc_faq.html
// Bjorn A Received on Mon May 24 2004 - 09:52:39 CDT
![]() |
![]() |