Subject Re: [firebird-support] Using Null as parameter in Stored Procedure
Author Helen Borrie
At 02:39 PM 23/08/2004 -0600, you wrote:

>Hi I'm trying to use a stored procedure to collect some accounting
>information. In my stored procedure I pass in 3 input variables, an
>Accounts Receivable Record key value, a Publication key value, and a date.
>I use this procedure to basically find out how the ARTransaction record is
>split by publication at a certain point in time. In our model an
>ARTransaction record can be unassigned (null) ie having no publication key
>value associated with it. When I use this stored procedure it works perfect
>with records that have publication keys (ie not null) as soon as I use null
>as a value for the publication key value, I get results I did not expect.

Passing Nulls in parameters is fine, but your SP code would have to handle
nulls in some way. Can't advise anything without seeing the code.

>The weird thing is that I am using IBExpert to create and edit all my
>FireBird psql, and when I use the built-in debugger I am able to walk
>through my code and view the results that I am expecting.

Debuggers don't execute the SP code, so you won't see run-time errors
during debugging.

>It seems that for
>some reason this stored procedure is not working in isql, or dsql (which I
>call from my Delphi application). This is my first time posting to this
>news group so I apologize if I have broken any rules.

The main rule is that you try to avoid asking people to search for a needle
in a haystack. Present enough details about problems so people know what
you need help with.

Your quote:
Try not to become a man of success but rather to become a man of value.
Albert Einstein

Support list paraphrase:
Try not to present a problem description of "guess" but a rather problem
description of value.