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 -> Passing large string buffers from C extended proc

Passing large string buffers from C extended proc

From: mukesh bhakta <mukesh_bhakta_at_hotmail.com>
Date: 11 Apr 2006 16:17:04 -0700
Message-ID: <1144797424.189948.40400@z34g2000cwc.googlegroups.com>


Hi guys,

My previous mail in another group was left unanswered. May be someone here can help -

I am trying to do something pretty simple as follows -

  1. Create a C/C++ export method in a Windows DLL that returns a string buffer. The template is as follows -

char * shell(const char *input)
or

void shell(const char *input, char *&p);

2. In SQL plus -

create or replace function func(input IN varchar2) return varchar2
as external
library shell_lib
name "shell"
language C
parameters (input string,
return xxx);

When the buffer length is less than the set limit all is fine. However,

I get errors from Oracle when the buffer is above the limit. ORA-24345: A Truncation or null fetch error occurred

ERROR:
ORA-01002: fetch out of sequence

Right now I am not using OCI and don't intend to use it if not necessary. All I want to do is pass a huge string array from the sp back to my calling application.

Any tips?

Regards

MB Received on Tue Apr 11 2006 - 18:17:04 CDT

Original text of this message

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