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 -> Help with Extproc & OCI!

Help with Extproc & OCI!

From: Toby Room <s344024_at_student.uq.edu.au>
Date: Fri, 05 Nov 1999 23:37:14 +1000
Message-ID: <3822DD89.F396963A@student.uq.edu.au>


Greetings OCI Extproc Gurus!

Are there any examples out there of C code which makes use of OCI functions in an external procedure context? Specifically, I need examples/help with using the following functions
(purposes listed to the right):

OCITypeByName       - Get tdo types for arrays
OCIObjectNew        - instantiate OCIArray object
OCIStringAssignText - Assign a char* variable to an OCIString
OCICollAppend       - Add the OCIString to an array


A bit of background information....I have a program (DLL) which is to be called from within oracle (pl/sql) and return a result in the form of an OCIArray (==Varray(?)). It does not execute correctly though & returns an error which leads me to believe that the problem is to do with my
(poor) use of the OCI programming constructs.

The basics of what the dll does is to firstly set up the OCIarray variable that will be returned to oracle. After some processing, the dll has several char* variables, each of which should be placed in the array. Before this is done though, the char*'s need to be converted to OCIString so that they can be read once they are returned to oracle.

Does anyone have any ideas or sample code for doing this? I have found the oracle docs to be quite lacking!

Thanks enourmously!

--Toby Received on Fri Nov 05 1999 - 07:37:14 CST

Original text of this message

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