I have following statements in Oracle query window in VS2010,
It does not show output!, event the statement dbms_output.put_line(‘Hello’) shows nothing;
How do I enable the output ?
set serveroutput on;
clear;
declare c sys_refcursor;
r pkgPriceWorx.recPriceListCustomers;
comno varchar2(3);
cpls number;
o varchar(3000);
disc number;
begin
--select * from ftPriceListCutomers('020','221');
comno:='020';
cpls:=221;
dbms_output.put_line('helllo');
--c:=pkgPriceWorx.ftPriceListCustomers(comno,cpls);
--loop
-- fetch c into r;
--dbms_output.put_line(r.cuno);
dbms_output.put_line('helllo');
--exit when c%notfound;
--end loop;
disc:=23.2;
pkgPriceWorx.prUpdateOrInsertDiscount('020','221','000051','1AA00','20-mar-1999',disc,o );
end
The
set serveroutput on;andclear;are sqlplus commands, not plsql so they will probably won’t work in other environments.I don’t know if you can write messages to some standard output this way, but if you want to debug your plsql from vs2010, you can use this tutorial:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/dotnet/debugging/Debugging.htm
or use UTL_FILE for logging to a file.