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: oci & OCI_ATTR_STMT_TYPE

Re: oci & OCI_ATTR_STMT_TYPE

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Sun, 25 Jun 2006 16:19:55 +0100
Message-ID: <d9at92ts8pdlkqeg9oau10lmaskhlga1c0@4ax.com>


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 tool
Received on Sun Jun 25 2006 - 10:19:55 CDT

Original text of this message

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