Subject Re: [IBO] Re: Null in Stored Procedure parameter.
Author Lucas Franzen
Dale,

Okay, if this problem continues existing then how about using a little
workaround and passing 0 (assuming that your ids start with 1) as ID to
the procedure and let the procedure handle it as null?

But I made a small testprogramm and it worked okay.

So I doubt that it's a problem of the StoredProc component, maybe you
should show us rather the code of your stored procedure.

It seems like you're doing an update on a field setting it to NULL which
is defined as NOT NULL.

Luc.

Dale Tabbert schrieb:
>
> Hello again,
>
> --- In IBObjects@egroups.com, Lucas Franzen <luc@r...> wrote:
> > When calling the procedure this should work:
> >
> > procedure DoExceSP;
> > begin
> > with mySP do
> > begin
> > Prepare;
> > if noID
> > then ParamByName ( 'ID' ).Clear
> > else ParamByName ( 'ID' ).AsInteger := myID;
> > ParamByName('VAL').AsString := mykeyValue;
> > ExecProc;
> > Unprepare;
> > end;
> > end;
>
> I still get ISC ERROR MESSAGE:
> validation error for column KEYWORD_ID, value ''***null***''.
> Process stopped. Use Step or Run to continue
>
> What am I missing??? Here is the code.
>
> with spAddObjKWValue do begin
> Prepare;
> parambyname('Object_ID').AsInteger := object_id;
> parambyname('Keyword_id').clear;
> parambyname('Keyword_Name').AsString := 'Some Name';
> parambyname('Keyword_Value').AsString := 'Some Value';
> ExecProc;
> Unprepare;
> end;{with spAddObjKWValue}
>
> Dale