DBMS_OUTPUT 在 Toad on Eclipse 中

DBMS_OUTPUT in Toad on Eclipse

我正在 Eclipse 中使用 Toad 编写 PL/SQL 存储过程。我让它工作得很好,程序如下:

CREATE OR REPLACE PROCEDURE crl_sync
IS

    unit_separator CONSTANT char:= CHR(31);
    record_separator CONSTANT char:= CHR(30);

    CURSOR c_bc is
        SELECT m.barcode, s.id, s.tracking_tags 
        FROM model m, sample s 
        WHERE m.id = s.id;
        r_bc c_bc%ROWTYPE;

BEGIN
    DBMS_OUTPUT.ENABLE(1000000);
    DBMS_OUTPUT.PUT_LINE('--CRL_SYNC--');
    OPEN c_bc;
    LOOP
        FETCH c_bc into r_bc;
        EXIT WHEN c_bc%NOTFOUND;
        DBMS_OUTPUT.PUT_LINE('barcode = '||r_bc.barcode);
    END LOOP;
    CLOSE c_bc;
END;
/

它编译和执行都很好;请注意开头的 DBMS_OUTPUT.ENABLE 行和 put_line 以排除查询问题,但在 Eclipse 中的蟾蜍 window 中仍然没有任何问题。有人可以指出我在这里做错了什么吗?

谢谢。

[将此问题显示为已回答]

尝试 this page 上的建议:

There are two editors for Oracle, called "SQL Worksheet" and "Stored Procedure Editor", you can open them with icons in the Connections View. DBMS Output view works with SQL WORKSHEET. So, go to the DBMS output view and enable it with the "bulb" icon. Now, open the SQL Worksheet.