Subject Re: How can I confirm a bug report has been received?
Author riasteve2000
> are you refering to this?
>
> > I have a stored procedure which simply does a single insert into a
> > table. When I execute this procedure, I get a unique key
constraint
> > violation. The reason is that the insert statement appears to be
> > executed twice, eventhough there is only one insert statement in
the
> > procedure. There are no triggers that would be causing the extra
insert
> > to occur.

yes, this is what I am referring to

>
> You did not report a bug, but you described a problem with
IBOConsole.
>
I first posted a description of the bug in this forum, but received no
replies or feedback. I sent Lorenzo an email (as per Artur's
suggestion) with script necessary to reproduce the problem. I thought
this to be somewhat strange in that 1)Lorenzo has no idea as to who I
am and may not appreciate getting email from unknown characters (I
know I don't and I usually delete them), 2)direct contact with the
author deprives other participants in this forum from benefitting from
the discussion (which is one purpose of these forums, is it not?).


> > Before I try to recreate this with one of the example gdb's, I
wanted
> > to know if this is a known problem with IBO Console. It does not
happen
> > with IBConsole under IB.
>
> It would be very helpful if you could provide a test case, i.e.
adapt your
> stored procedure to show the error with the example database,
> employee.gdb. Without knowing the code of your procedure, it is very
> difficult to help. I've just created a simple stored procedure that
> inserts a value into a table:
>
> create procedure SP_TEST
> as begin
> insert into USR(NAME) values("TEST");
> suspend;
> end
>
> Everything works fine here if I execute this SP with IBOConsole.
>
try this on the Employee.GDB data base...

CREATE PROCEDURE ATEST(DEPT_NO_IN CHAR(3), DEPARTMENT_IN VARCHAR(25))
RETURNS(DEPT_NO CHAR(3), DEPARTMENT VARCHAR(25)) AS
BEGIN
DEPT_NO = DEPT_NO_IN;
DEPARTMENT = DEPARTMENT_IN;

INSERT INTO DEPARTMENT(DEPT_NO, DEPARTMENT)
VALUES(:DEPT_NO, :DEPARTMENT);

SUSPEND;
END

Now, fire the procedure from the ISQL window in IBOCONSOLE...

select * from ATest('1','name')

You will get a unique key constraint, because the procedure is fired
twice and the constraint occurs on the second execution of the script.
Look at the Department table and you will see the results of the first
insert.

If you setup a stored procedure to insert into a table that can handle
duplicate records, then you will see two rows inserted into the table.
I have reproduced this problem many times in many different stored
procs. The common element here is the stored procedure. Doing an
insert directly from ISQL works OK.

tia
steve