Re: How to debug "into" oci?

Tamás Gulácsi <[email protected]>
Newsgroups gmane.comp.python.db.cx-oracle
Message-ID <CAHVzvyTpXSCJ1SwhnaLN5fRh+MStgDSpg+3+E9fLZv=BY6wGig@mail.gmail.com>
> Date: Thu, 30 May 2013 19:01:27 +0200
> From: "Amaury Forgeot d'Arc" <[email protected]>
> Subject: Re: [cx-oracle-users] How to debug "into" oci?
> To: [email protected]
> Message-ID:
>         <CAGmFidYURUctub-fafb1KywfmM=z6V2TXqK6PngO1tAQJn52GQ@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> >From your output:
>> dataArr: 0xc2000001a8
> This seems to be the address on the stack.
> Is the address still valid when OCIStmtExecute runs?
> This is important, because this is where the ref cursor will be returned.
>
> In cx_Oracle, "dataArr" is always an array of one or more objects.
> Here the objects are pointers (OCIStmt*), but they still need to be
> allocated on the heap.
>
> --
> Amaury Forgeot d'Arc

Thanks Amaury!

Of course the problem was with my code: I've written the (temp) cursor
handle to dataArr, not the address of it!
Although this has nothing to do with allocation, but convinced me to
clean up my code, as that has the error.
Re-read the available documentation, and the last line of Table 5-1 at
http://docs.oracle.com/cd/B12037_01/appdev.101/b10779/oci05bnd.htm#438183
said I need to write the address of the *OCIStmt, and I wrote only
*OCIStmt, not **OCIStmt... I've tried, and it works now!

Thanks again,
Tamás Gulácsi

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
cx-oracle-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.