Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-06521: PL/SQL: Error mapping function
Thanks Sybrand and Vladimir for your inputs. I managed to get over that
issue by including a return value of VARCHAR2 to the user and
converting the procedure to a function. But I have to get over another
hurdle. Here is what I am doing -
extern "C"__declspec(dllexport) unsigned char * shell(const char *cmd) {
string fmt(cmd);
fmt += " > c:\test.txt";
int ret = system(fmt.c_str());
// read the c:\test.txt and wrap the contents into an xml
return (unsigned char *) xml;
}
4. The stored proc is registered as follows -
create or replace procedure shell(cmd IN varchar2)
return raw
as external
library shell_lib
name "shell"
language C
parameters (cmd string,
return raw);
I couldn't find much information on using RAW types with C external procs.
Any help/tips will be greatly appreciated.
Regards
MB Received on Sun Apr 09 2006 - 18:53:14 CDT
![]() |
![]() |