Hi all,
i have downloaded the OCL from your WebSite.
I try to execute a storred procedure on an oracle database which returns a recordset.
I have tryed it with
exec procname param
and
call procname(param)
both does not work ...
In the two cases i get an ORA-20004 (Unknown error) exception ...
If i call a procedure without a parameter it works ...
We are already using ODAC in Delphi and there we used the TORAStoredProc class, which does not exist in this lib.
Is this a limitation, or not possible ?
Does somebody has an working example ?
Kr
Christian
OCL
Please try the following code
Code: Select all
OraConnection connection;
connection.open("test/test@ora");
connection.startTransaction();
OraCommand cmd1( connection, (LPCTSTR)"begin INOUT_STR_PROC(:p); end;" );
OraParam *p1 = &cmd1.param(0);
p1->setName("p");
p1->setDataType(dtVarChar);
p1->setString("11");
p1->setDirection(pdInputOutput);
cmd1.execute();
CRString s = cmd1.param(0).getString();
Code: Select all
CREATE PROCEDURE INOUT_STR_PROC
(
varchar_p1 IN OUT VARCHAR2
) IS
BEGIN
varchar_p1 := varchar_p1 || '1234567890';
END INOUT_STR_PROC;