Hi,
I'm trying to capture the results from commands I'm typing using the dbms_aw package
I've been following this guide and have managed to display the output from dbms_output.get_line just fine. I'm not having the same success trying to display multiple lines (using dbms_output.get_lines).
Here's my code. It fails on the AdoCommand1.execute() line with "wrong number or types of arguments in call to 'GET'LINES' ORA-06550: line1, colum 7"
Hopeflly it's something simple but it's got me totally stumped.
Many thanks in anticipation.
I'm trying to capture the results from commands I'm typing using the dbms_aw package
I've been following this guide and have managed to display the output from dbms_output.get_line just fine. I'm not having the same success trying to display multiple lines (using dbms_output.get_lines).
Here's my code. It fails on the AdoCommand1.execute() line with "wrong number or types of arguments in call to 'GET'LINES' ORA-06550: line1, colum 7"
Code:
procedure TForm4.multilineButtonClick(Sender: TObject);
var
P, Q: TParameter;
begin
ADOCommand1.CommandText := 'dbms_output_test.emit_multiple_lines';
ADOCommand1.CommandType := cmdStoredProc;
ADOCommand1.Execute();
ADOCommand1.CommandText := 'begin dbms_output.get_lines(:lines, :numlines); end;';
ADOCommand1.CommandType := cmdText;
ADOCommand1.Parameters.Clear;
p:=ADOCommand1.Parameters.CreateParameter( 'lines', ftstring, pdoutput, 32000, null );
q:=ADOCommand1.Parameters.CreateParameter( 'numlines', ftInteger, pdinputoutput, 0, null );
AdoCommand1.Execute();
ShowMessage( 'p ' + ADOCommand1.Parameters[0].value);
ShowMessage( 'q ' + inttostr(ADOCommand1.Parameters[1].value));
Hopeflly it's something simple but it's got me totally stumped.
Many thanks in anticipation.