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 -> Oracle8 External Procedures Question

Oracle8 External Procedures Question

From: <vjavaly_at_hotmail.com>
Date: Mon, 01 Mar 1999 20:11:24 GMT
Message-ID: <7bes94$35h$1@nnrp1.dejanews.com>


I'm encountering a problem trying to setup a simple external procedure call (Oracle8/NT). The C code is compiled into a DLL under MS Visual C++ 5.0. Can anyone help? Reply to vjavaly_at_hotmail.com. Thank you.

C Code



#include <stdio.h>
void writeOutstr (char *path, char *message) {

   FILE *fp;
   fp = fopen (path,"w");
   fprintf (fp, "%s\n", message);
   fclose (fp);
}

Create Library Syntax



create library testExtProcs as 'E:\OraDBA\Admin\QA1\Local\Test2.dll';

Wrapper Procedure Code



CREATE OR REPLACE PROCEDURE EXT_WRITEOUTSTR (
	P_PATH		IN	VARCHAR2,
	P_MESSAGE	IN	VARCHAR2) IS
EXTERNAL LIBRARY TESTEXTPROCS
	NAME "writeOutstr"
	LANGUAGE C
	PARAMETERS (P_PATH string, P_MESSAGE string);

/

External Procedure Call Syntax And Resulting Errors



begin
ext_writeoutstr ('e:\oradba\admin\qa1\local\test2.txt','Test line.'); end;
/

begin
*
ERROR at line 1:
ORA-06521: PL/SQL: Error mapping function
ORA-06522: Unable to load symbol from DLL
ORA-06512: at "SAMPLE.EXT_WRITEOUTSTR", line 0
ORA-06512: at line 2

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
Received on Mon Mar 01 1999 - 14:11:24 CST

Original text of this message

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