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: ODBC executing Stored Procedure

Re: ODBC executing Stored Procedure

From: Matthias Gresz <GreMa_at_t-online.de>
Date: Tue, 19 Jan 1999 08:18:08 +0100
Message-ID: <36A431B0.4EAD42D6@Privat.Post.DE>

kelvinw_at_asymetrix.com schrieb:
>
> Hi,
>
> I have a stored procedure written and loaded into a oracle database
> using the following ODBC API sccessfully. The Intersolv 3.11
> Multi-thread ODBC driver is being used.
>
> SQLExecDirect( odbc_hstmt, (UCHAR *)sObjBuf, strlen( sObjBuf ) );
> where sObjBuf contains the stored procedure.
>
> But when I used SQLExecDirect() the execute the stored procedure, I
> got the invalid SQL statemnet error message.
>
> sprint( sObjBuf, "%s", "Execute stored_procedure_name" );
> SQLExecDirect( odbc_hstmt,
> (UCHAR *)sObjBuf, strlen( sObjBuf ) );
>
> I have tried to use same method against an MSSQL database and it works
> just fine. The stored procedure doesn't have any argument. It looks
> like the ODBC driver doesn't allow a stored procedure being executed
> directly using SQLExecDirect(). Does anyone know where the problem
> is? Any help is appreciated.
>
> Thanks.

to call an oracle SP from ODBC use the following syntax:

BEGIN <schema>.<sp-name>(param1,param2);END;

HTH
Matthias
--
Matthias.Gresz_at_Privat.Post.DE

Always log on the bright side of life.
http://www.stone-dead.asn.au/movies/life-of-brian/brian-31.htm Received on Tue Jan 19 1999 - 01:18:08 CST

Original text of this message

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