Re: [cx-oracle-users] How to debug "into" oci?
Brought to you by:
atuining
From: Tamás G. <gt...@gt...> - 2013-06-24 20:04:53
|
> Date: Thu, 30 May 2013 19:01:27 +0200 > From: "Amaury Forgeot d'Arc" <ama...@gm...> > Subject: Re: [cx-oracle-users] How to debug "into" oci? > To: cx-...@li... > Message-ID: > <CAGmFidYURUctub-fafb1KywfmM=z6V...@ma...> > 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 |