|Oracle 8i Data Cartridge Developer's Guide
Release 2 (8.1.6)
Part Number A76937-01
Methods: Using C/C++ and Java , 11 of 13
Usually, when an external procedure fails, its C prototype is faulty. That is, the prototype does not match the one generated internally by PL/SQL. This can happen if you specify an incompatible C datatype. For example, to pass an
OUT parameter of type
REAL, you must specify float *. Specifying float, double *, or any other C datatype will result in a mismatch.
In such cases, you might get a lost RPC connection to external procedure agent error, which means that agent extproc terminated abnormally because the external procedure caused a core dump. To avoid errors when declaring C prototype parameters, refer to Table 4-2
To help you debug external procedures, PL/SQL provides the utility package
DEBUG_EXTPROC. To install the package, run the script
sql, which you can find in the PL/SQL demo directory.
To use the package, follow the instructions in dbgextp.sql. Your Oracle account must have
EXECUTE privileges on the package and
If you are developing on a Windows NT system, you may perform the following additional actions to debug external procedures:
At this point, if you have built your DLL in a debug fashion with Microsoft Visual C++, Visual C++ is activated.