The CREATE OR REPLACE PROCEDURE pro_lee01 (in_a IN NUMBER, out_01 OUT NUMBER, cur_01 OUT p_lee01. Cur_lee01) IS
The BEGIN
Out_01:=3;
The OPEN cur_01 FOR
SELECT * FROM TLEE01;
Dbms_output. Put_line (IN_a);
END;
Above for Oracle stored procedures, the use of ODAC calls inquiries, one cursor cur_01 output parameters, this cursor parameters in Delphi client how to deal with, please?
Procedure TForm1. Button9Click (Sender: TObject);
Var
S: a string;
The begin
S:='begin pro_lee01 (, a, :, b: cur_01); end; ';
OraQuery1. SQL. The Clear;
OraQuery1. SQL. The Add (s);
OraQuery1. The AutoCommit mode:=false;
OraQuery1. FetchAll:=true;
OraQuery1. ParamByName (' a '). The value:=4;
OraQuery1. ParamByName (' b '). ParamType:=ptoutput;
OraQuery1. ParamByName (' b '). The DataType:=ftinteger;
OraQuery1. ParamByName (' cur_01). ParamType:=ptoutput;
OraQuery1. ParamByName (' cur_01). DataType:=ftcursor;//output is a result set of many fields, the cursor on the client side shows how to split?
OraQuery1. Open;
Showmessage (OraQuery1 ParamByName (' b '). AsString) are identical.//show the return value
ShowValue (OraQuery1, Button8. Caption);
end;
Client with ODAC Query calls inquiries, including the cursor cur_01 output parameter is a multi-field result sets, the client how to deal with the cursor shows multiple fields in the result set?
CodePudding user response:
Its top it, guys