Subject | Re: Using Null as parameter in Stored Procedure |
---|---|
Author | todd_pinel |
Post date | 2004-08-24T17:12:42Z |
--- In firebird-support@yahoogroups.com, "Martijn Tonies"
<m.tonies@u...> wrote:
I have 4 sp's nested within eachother and when I trace down to the
3rd level sp (which in the problem case is passed a null in an input
parameter) the debugger shows me the correct result, say its $10.
But when it exits and jumps back up to the 2nd sp this value is lost
and I have $0 which is incorrect. This only happens when I have
null being passed in as an input parameter. I have been using
IBExpert for almost 2 years now and I have never had too many issues
with it, I have found its debugger to be quite reliable and in my
mind it is showing me exactly whats happening at run time. For some
reason my 3rd sp collects the expected result on a null parameter
but when its called from within the second sp it returns a 0. I
should also add that I have nested these sp's so that I can call
each one seperately from other places in my program and if I call
the 3rd sp using a null parameter from isql IBExpert and IBConsole
reutrn the $10 that I expect. This is why I was wondering if there
is maybe some issue when passing a null into a sp? Thanks for all
the input, this news group is really awesome. Todd.
<m.tonies@u...> wrote:
>all my
> > >The weird thing is that I am using IBExpert to create and edit
> > >FireBird psql, and when I use the built-in debugger I am ableto walk
> > >through my code and view the results that I am expecting.errors
> >
> > Debuggers don't execute the SP code, so you won't see run-time
> > during debugging.handling
>
> Or, it does show runtime errors but the debugger has a bug in
> NULLs and automatically converts the SQL statement to IS NULL& MS SQL
> instead of doing the = NULL like the procedure is doing :-)
>
> You might want to check IBExperts SQL trace for this.
>
> With regards,
>
> Martijn Tonies
> Database Workbench - developer tool for InterBase, Firebird, MySQL
> Server.I think I perhaps didn't explain whats going on well enough:)
> Upscene Productions
> http://www.upscene.com
I have 4 sp's nested within eachother and when I trace down to the
3rd level sp (which in the problem case is passed a null in an input
parameter) the debugger shows me the correct result, say its $10.
But when it exits and jumps back up to the 2nd sp this value is lost
and I have $0 which is incorrect. This only happens when I have
null being passed in as an input parameter. I have been using
IBExpert for almost 2 years now and I have never had too many issues
with it, I have found its debugger to be quite reliable and in my
mind it is showing me exactly whats happening at run time. For some
reason my 3rd sp collects the expected result on a null parameter
but when its called from within the second sp it returns a 0. I
should also add that I have nested these sp's so that I can call
each one seperately from other places in my program and if I call
the 3rd sp using a null parameter from isql IBExpert and IBConsole
reutrn the $10 that I expect. This is why I was wondering if there
is maybe some issue when passing a null into a sp? Thanks for all
the input, this news group is really awesome. Todd.