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: External Procs...passing pl/sql tables as parameters to dll's

Re: External Procs...passing pl/sql tables as parameters to dll's

From: Finn Ellebaek Nielsen <fen_at_changegroup.dk>
Date: Mon, 16 Aug 1999 20:06:57 +0100
Message-ID: <7p9k5j$c01$1@news.inet.tele.dk>


Steve B <steve.bright_at_capgemini.co.uk> wrote in message news:7p8p6o$1uj$1_at_taliesin.netcom.net.uk...
> I've been given the unenviable task as a non-C programmer to devise a way
of
> passing long raw data ( selected from a database table ) to a C dll....
>
> I've written the following code to define my external library and function
> to call the dll...what I don't know is the way to define the c function,
> being a novice at C programming...
>
> My main problem is the definition of the datatype that the C program is
> expecting as a parameter.
>
> The following is the function and datatype definitions.....
>
> CREATE OR REPLACE PACKAGE pnet_ext_procs_pkg AS
>
> TYPE curveType IS TABLE OF LONG RAW INDEX BY BINARY_INTEGER;
>
> END;
> /
>
>
> CREATE OR REPLACE FUNCTION TEST_BOOKEDTIME
>

> prActCurve IN OUT pnet_ext_procs_pkg.curveType,
> )
> RETURN BINARY_INTEGER AS LANGUAGE C
> LIBRARY test_pldll
> NAME "bookedTime";
> /
>
>
> I want to call the test_bookedtime dll function...passing the correct
datatype as a parameters..
>
> Has anyone any ideas how this can be achieved ???
>
> Can it be achieved using external procedures or must I delve into the
world of Pro*C or something like that ??
>
> Is there an easier way to do this ??
>
> Any suggestions will be greatly appreciated...
>
>
>
> Cheers
>
> Steve Bright
>
> steve.bright_at_capgemini.co.uk

The RAW (and LONG RAW I suppose) should map to unsigned char *.

If you before you create your TEST_BOOKEDTIME function issue the following statement

  alter session set events = '10936 trace name context level 1';

and then create your function Oracle will write the expected C prototype for the function in a trace file where you can pick it up.

HTH. Finn Received on Mon Aug 16 1999 - 14:06:57 CDT

Original text of this message

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