Subject Re: [firebird-support] passing NULL using api
Author Helen Borrie
At 07:27 AM 25/08/2004 +0000, you wrote:
>I have posted this issue before with little response and really need
>a solution as any help would be much appreciated.
>I have been using the firebird api (firebird 1.50 CS) to pass
>input parameters to some statements. When I try and pass NULL as a
>input parameter I get an SQL error (-804 - An
>error was found in application input parameters for the SQL
>statement!!) error on Linux.
>Has anybody come across the same problem?

An -804 error to happen is caused by passing the wrong number of
parameters, or by passing values of an unexpected data type, or by passing
parameters to an unprepared statement.

What is the application that is giving you this error message? The SQL
code is a Firebird high-level error code, but the error message isn't a
Firebird one.

>Is there a work around?

You haven't provided enough information yet to pinpoint the problem, let
alone provide a solution. Things that would help to get closer to it:
1) the declaration part of the stored procedure
2) the actual statement as presented to the API
3) the 9-digit isc error code that is returned when the exception occurs
4) the compilers you used on Windows and Linux, respectively

>Does anybody have example code of passing NULL as an input parameter
>that works on Linux ?

The API is platform-neutral. If your source code compiled and worked as
expected on Windows but caused an exception condition when compiled and run
on Linux, it would indicate some discrepancy between the compilers,
wouldn't it?

> I am probably missing the obvious solution as I cannot believe someone has
> not tried to do this before.

People pass nulls in parameters all the time. Track back in the archive to
the examples Dmitry Sibiryakov and Ivan Prenosil gave you a few days ago.
Show us some code..