Oracle PL/SQL Technical Forum Displayed below are the messages of the selected thread. Thread Status: Closed From: Bikash Mohanty 05-Jul-00 08:02 Subject: C++ External Procedure possible !!! C++ External Procedure possible !!! Oracle 8.0.5 on NT. I have a Windows DLL written in C++ for one Network interface function. I'm using this DLL through ORA_FFI in Forms 5.0 Now I need to integrate this in server side using stored program units. I'm getting the error when trying to run the procedure through EXTPROC. ORA-06521:PL/SQL: Error mapping function. ORA-06522:Unable to load Symbol from DLL. It's loading the DLL but the function is not identified. After few investigation I came to know that C++ is not supported in this version. Any workaround for this ? Any new version of Oracle server for NT supports C++ interface.( I mean 8.1.5 or 8.1.6) ? Thanks for the help. Bikash. -------------------------------------------------------------------------------- Subject: Re : C++ External Procedure possible !!! Hi, Oracle supports the below languages in 8i, - C, by means of the Oracle Call Interface (OCI), as described in the Oracle Call Interface Programmer's Guide - C++, by means of the Pro*C/C++ precompiler, as described in the Pro*C/C++ Precompiler Programmer's Guide - COBOL, by means of the Pro*COBOL precompiler, as described in the Pro*COBOL Precompiler Programmer's Guide - Visual Basic, by means of Oracle Objects For OLE (OO4O), as described in the Oracle Objects for OLE/ActiveX Programmer's Guide , JAVA stored procedures is the better compared to external procedures if there is an option to choose between in 8i, Regards, Ashok Cg -------------------------------------------------------------------------------- From: Bikash Mohanty 06-Jul-00 00:10 Subject: Re : C++ External Procedure possible !!! The DLL has been provided by an external agenncy and I don't have the source code for that. We can choose any Oracle Database for the purpose if required. Can we interface the external DLL through JAVA stored Procedure in Oracle 8i ? Thanks for your help. Bikash. -------------------------------------------------------------------------------- Subject: Re : C++ External Procedure possible !!! Hello, As far as my understanding, DLL can be used as external procedures from plsql. You can access java programs from plsql, by loading the java source / class files into database and accessing from the plsql procedures. Please refer to oracle documentation on 8i for more details. Doc is available on TECHNET.ORACLE.COM website. I am not aware as to how we can access the same DLL from java , inturn use this from plsql. Regards, Ashok cG -------------------------------------------------------------------------------- Subject: Re : C++ External Procedure possible !!! According to the documentation: Pro*C/C++ Precompiler Programmer³s Guide Release 8.1.5 A68022-01 Release 8.1.6 A76942-01 External procedures can only be in C. C++ external procedures are not supported. -------------------------------------------------------------------------------- Subject: Re : C++ External Procedure possible !!! Jan, Small update, f. External Procedure Support External Procedures written in Pro*C/C++ are now callable from PL/SQL. A REGISTER CONNECT Embedded SQL statement has been introduced. This new statement is used instead of a CONNECT statement in the External Procedure to define the current unnamed connection for the Global SQLLIB Runtime Context. Reference: ========== README FILE FOR PRODUCT Pro*C/C++ RELEASE 8.1.5 Regards, Ashok CG -------------------------------------------------------------------------------- Subject: Re : C++ External Procedure possible !!! Hi, If the methods in the current DLL can be accessed from C, then you can inturn access this method form pl/sql throu C library. This is appilcable to 8i. Until Oracle 8.0, the Oracle RDBMS supported SQL and the stored procedure language PL/SQL. In Oracle 8.0, PL/SQL introduced external procedures, which allowed the capability of writing C functions as PL/SQL bodies. These C functions are callable from PL/SQL and SQL (via PL/SQL). With 8.1, Oracle provides a special-purpose interface, the call specification, that lets you call external routines from other languages. While this service is designed for intercommunication between SQL, PL/SQL, C, and Java, it is accessible from any base language that can call these languages. For example, your routine can be written in a language other than Java or C and still be usable by SQL or PL/SQL, provided that is callable by C. Therefore, if you have a candidate C++ routine, you would use a C++ extern "C" statement in that routine to make it callable by C. This is form For more details Refer to oracle doc , Oracle8i Application Developer's Guide - Fundamentals Release 2(8.1.6) ->10 External Routines - The Need to Work with Multiple Languages ,