Subject Re: [firebird-support] Re: question: stored proc and FOR SELECT...DO
Author Martijn Tonies
Hi,

> here is my loop:
>
> FOR SELECT PK, FK_PROD
> FROM PRODUCT_TREE
> WHERE FK_PARENT = :THIS_PK_TREE AND FK_PROD IS NOT NULL
> INTO :PK_TREE_PROD, :PK_PROD
> DO
> BEGIN
>
> -- delete the record in the product tree
> DELETE FROM PRODUCT_TREE WHERE PK = :PK_TREE_PROD;
>
> -- SNIP ---
>
> END
>
> > That's how it is.
> >
> > You probably have done something wrong in your code --
> >
> > 1) how are you checking that the body is being processed?
>
> I'm using the debugger of EMS IBManager. There I can see
> that the line DELETE FROM... is processed, although there
> are no matching records....

You should know that there's no way to really debug a stored
procedure. All of these products (including Database Workbench)
parse your source code and EMULATE the server behaviour.

In this case, you're suffering from a faulty debugger. Suffice to say,
I know a better one ;-)

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com