Subject Re: [IBO] TIB_ROW
Author Paul Vinkenoog
Hi Peter,

> The Prepost event of the TIB_Import returns a TIB_ROW.
>
> I am trying to access all of the parameters as suggested by Jason to
> call a stored procedure that does an error trap on error code -803.
>
> I can access them by index, which I know is wrong.
> How do I access parameters by name ?

ARow.ByName( 'FieldName' ) returns the TIB_Column:

> // How do I do this by name ?????
> NR := Arow.Columns[0].AsInteger; // field is called NR

NR := ARow.ByName( 'NR' ).AsInteger;

But since you only need the value once, you can also bypass the
integer variable NR and the two AsIntegers:

> with IB_DeleteProc do
> begin
> // ParamByName('NR').AsInteger := NR;
---> ParamByName( 'NR' ).Assign( ARow.ByName( 'NR' ) );

> If not prepared then Prepare;
> ExecSQL;
> close;

Is IB_DeleteProc a TIB_StoredProc? Better use TIB_DSQL to call an SP.
Just call Execute on the TIB_DSQL; you don't have to "close" it.

BTW, I don't remember *why* TIB_StoredProc is less preferable - but
I'm sure someone else does :-)


Greetings,
Paul Vinkenoog