2 Replies Latest reply: May 30, 2013 12:50 PM by Christian.Shay -Oracle RSS

    how to read in VS2008 the dbms_output.put_line of oracle

    936666
      how to read in VS2008(C#,c++,aspx.......so on) the dbms_output.put_line of oracle

      I am having a stored procedure which will return the success or failure
      Note it is a sample Stored procedure i have used try to understand how it works in real case

      In Oracle 11g i am having the below table and stored procedure.
      Create Table Test(Col1 number(5),Col2 Varchar2(30));
       
      Create or replace procedure P_Test (P_check char,p_Col1 number ,p_Col2 Varchar2)
      as
      begin
      If P_check <=5 then
      dbms_output.put_line (1 ||','|| 'Please pass more than 5');
      return;
      end if;
      Insert into Test (Col1, Col2)
      Values (p_Col1,p_Col2);
      Commit;
      dbms_output.put_line (0 ||','||p_Col1 ||','|| p_Col2);
      End;
       
      exec P_Test(6,1,'test')
      I would like to read the output from the P_Test and display in front end application.

      is it is possible to read if the output is as dbms_output.put_line or the stored procedure needs to modify here with out parameter or ref-cursor.

      Since it is VS2008 based i am posting here.

      Thanks!