Board index » delphi » Passing NULLs in a DBXpress Stored Proc

Passing NULLs in a DBXpress Stored Proc

Can NULLs be passed by DBXpress Stored Procs?  If so how?  My results are
always a ftBCD that is zero when they get to Oracle.
 

Re:Passing NULLs in a DBXpress Stored Proc


No, NULL indicates state, not value. Writing paramByName().Clear clears the
param, it doesn't set to NULL, resulting in a param mismatch.

To make a stored proc to write a NULL you must an approriate flag to signal
to the stored procedure that NULL is wanted.

An Interbase example:

CREATE PROCEDURE "MyProc"
(
        myData INTEGER
)
AS
BEGIN
        IF (myData = -1) THEN myData = NULL;
        ...

END^

Metsis

Other Threads