Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Passing large char buffers from a C extended procedure

Re: Passing large char buffers from a C extended procedure

From: mukesh bhakta <mukesh_bhakta_at_hotmail.com>
Date: 10 Apr 2006 23:23:04 -0700
Message-ID: <1144736584.668719.312760@u72g2000cwu.googlegroups.com>


Hi Amogh,

Thanks for your input.

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? Received on Tue Apr 11 2006 - 01:23:04 CDT

Original text of this message

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