Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle dbms_output.get_lines help required

Status
Not open for further replies.

Franky35

Programmer
Mar 19, 2010
1
GB
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"

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top