Subject Re: Null in Stored Procedure parameter.
Author Dale Tabbert
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