Subject Re: [IBO] TIB_ROW
Author peter@cyionics.com
Thanks Paul

That's a great help, I'm doing this for my own experience, just to learn how to use these particular components correctly.
I believe I can assign the params to a TIB_DSQL , but how do I call my stored procedure from here ?, previously I have only used an TIB_Stored procedure ?


Rgds

Peter
----- Original Message -----
From: Paul Vinkenoog
To: IBObjects@yahoogroups.com
Sent: Saturday, November 15, 2003 10:40 PM
Subject: Re: [IBO] TIB_ROW


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


Yahoo! Groups Sponsor
ADVERTISEMENT




___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


[Non-text portions of this message have been removed]