Hi,
I want to call a stored procedure return a cursor, but I found, I execute a stored procedure and return a Bug using OraStoredProc, in fact he executed multiple times, or two calls a stored procedure.
A deposit paid storage content
CREATE OR REPLACE PROCEDURE test
(cur out curvar)
Is
Vlsh number (8);
Begin
Select lsh_seq.nextval into vlsh from dual;
Insert into tabtest (AA) values (vlsh);
Open cur for select * from tabtest;
End;
Please help to see where is the problem?
Hao
Bug in OraStoredProc?
Re: Bug in OraStoredProc?
Hello,
Please specify the exact versions of your IDE and ODAC, server and client, also the text or a screenshot of the error message. In addition, provide the script for creating the curvar type.
Please specify the exact versions of your IDE and ODAC, server and client, also the text or a screenshot of the error message. In addition, provide the script for creating the curvar type.
Re: Bug in OraStoredProc?
Delphi XE4, ODAC 9.0.1
In addition, I want to perform this step
Var
Ret:OleVariant;
Begin
OraQuery1.SQL.Text: ='begin (test: CUR); end;';
OraQuery1.ParamByName ('CUR'):.DataType = ftCursor;
OraQuery1.Open;
RET: = DataSetProvider1.Data;
A fault.
In addition, I want to perform this step
Var
Ret:OleVariant;
Begin
OraQuery1.SQL.Text: ='begin (test: CUR); end;';
OraQuery1.ParamByName ('CUR'):.DataType = ftCursor;
OraQuery1.Open;
RET: = DataSetProvider1.Data;
A fault.
Re: Bug in OraStoredProc?
Oracle 10.2.0.1(OCI)
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
OraQuery1.SQL.Text := 'begin yp_test(:CUR); end;';
OraQuery1.ParamByName('CUR').DataType := ftCursor;
OraQuery1.Open;
ClientDataSet1.Data := DataSetProvider1.Data; //The first execute a stored procedure that returns a record;Second to execute the stored procedure returns three records
end;
Re: Bug in OraStoredProc?
Hello,
Such behaviour is due to the fact that you firstly call Open of OraQuery (a stored procedure is executed), and then recall OraQuery execution on assigning ClientDataSet1.Data := DataSetProvider1.Data;
To solve the problem, you should delete the OraQuery1.Open; line.
Such behaviour is due to the fact that you firstly call Open of OraQuery (a stored procedure is executed), and then recall OraQuery execution on assigning ClientDataSet1.Data := DataSetProvider1.Data;
To solve the problem, you should delete the OraQuery1.Open; line.
Re: Bug in OraStoredProc?
Hello,
If you have any other questions, feel free to contact us
If you have any other questions, feel free to contact us