为什么VS2010 oracle查询窗口不显示输出 [英] Why does not VS2010 oracle query window show output

查看:180
本文介绍了为什么VS2010 oracle查询窗口不显示输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS2010的Oracle查询窗口中有以下语句, 它不显示输出!,如果语句dbms_output.put_line('Hello')不显示任何内容; 如何启用输出?

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

推荐答案

set serveroutput on;clear;是sqlplus命令,而不是plsql,因此它们可能无法在其他环境中使用.
我不知道您是否可以通过这种方式将消息写入某些标准输出,但是如果您想从vs2010中调试plsql,则可以使用本教程:
http://www.oracle.com/webfolder /technetwork/tutorials/obe/db/dotnet/debugging/Debugging.htm

The set serveroutput on; and clear; 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

或使用 UTL_FILE 记录到文件

这篇关于为什么VS2010 oracle查询窗口不显示输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆