Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: oci & OCI_ATTR_STMT_TYPE
On 25 Jun 2006 08:12:40 -0700, "stef" <stef.pellegrino_at_gmail.com> wrote:
>under Oracle 10g with a little C program, I want to know what kind of
>query I have, but after doing
>
>sql = "exec mysp(:my_refcursor);";
That's not a valid statement. "EXEC proc" is an SQL*Plus command, a shortcut for "begin proc; end;".
>OCIStmtPrepare(dbproc, err, sql, strlen(sql), OCI_NTV_SYNTAX,
>OCI_DEFAULT);
>
>//
>// >>>> stmt_query_type gives me... 0 !! (and no error)
You must have missed an error earlier, because that statement won't parse. I would assume you end up with OCI_STMT_BEGIN if successful.
-- Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis toolReceived on Sun Jun 25 2006 - 10:19:55 CDT