Re: PL/SQL with OCI Help

From: Scott Urman <surman_at_oracle.com>
Date: 3 Feb 1995 02:03:07 GMT
Message-ID: <3gs2sr$kc6_at_dcsun4.us.oracle.com>


In article <3gobh6$r3d_at_welby.ahc.ameritech.com>, aasadi_at_tejas.kdsi.com (Abbas Asadi) writes:
|> I am working on a project (ORACLE7 with PL/SQL extension) which executes
|> a stored procedure on the server and return the results (if any) to users.
|> This is being done in a C interface. The problem is that I do not know if
|> I have to call "ofetch" after "oexec" or not. How do I know if this stored
|> procedure (dynamically supplied by user at run time) returns any row or not.
|> SYBASE has an easy way (a simple dblib call) indicatiny if the SP returns any
|> row(s).
|>
|> I' ll appreciate any suggestion/help/C example.
|>
|> aasadi_at_texas.akd
|> (214) 301-6142

Very simple. A stored procedure will NEVER repeat NEVER return any rows. You NEVER call an ofetch() after a procedure call. Stored procedures return results via OUT parameters. You don't fetch from them.

Note - In 7.2 you will be able to return a cursor variable from a stored procedure, and you can fetch from that. But you still don't fetch from the same cursor in which you parsed and executed the anonymous PL/SQL block calling the procedure (did I say NEVER enough?). Received on Fri Feb 03 1995 - 03:03:07 CET

Original text of this message