Eliminate Bind Variables Popup in Toad Data Point?

923 Views Asked by At

I created this stored procedure in Oracle, using Toad Data Point:

create or replace PROCEDURE show_users
(
    CUR OUT SYS_REFCURSOR
)
AS
BEGIN
  OPEN CUR FOR
    select * From dba_users;
END show_users;

I execute it with the following code, but I'm getting the Bind Variables popup, understandably:

declare
    mycursor SYS_REFCURSOR;     

    begin
     show_users( :mycursor );
    end;

And I get this popup:

enter image description here

The following Executed Successfully and the popup does not show up, but nothing's displayed since I'm not telling it to show me the contents of the ref cursor:

declare
    mycursor SYS_REFCURSOR;     

    begin
     show_users( mycursor );
     --print mycursor;
    end;

My question: How can eliminate the Bind Variables Popup in Toad or display the contents of a SYS_REFCURSOR? print mycursor; works In SQL DEVELOPER but not in Toad.

I just want to test the stored procedure without additional input.

3

There are 3 best solutions below

0
On

Try Set Define Off;

I'm not sure if this will work for you however it works for me while working within SQL Developer and I need to compile code that has bind variables such as Triggers or report sql that contains bind variables.

1
On

Remove a colon in front of its name. It is a locally declared variable, no need ti use it as a parameter.

0
On

The documentation in Toad data point explains this : Notes:

Avoid using the same symbol to represent a bind variable and statement delimiter in the same SQL statement. In the Editor, click to enable/disable binding variables in the SQL. When disabled, Toad does not scan SQL for parameters. This button is enabled (depressed) by default.

It is just next to the DB selection dropdownlist. I had the same issue when trying to create a trigger with :new.id