Subject RE: [IBO] Unidirectional Cursor
Author Bill Morrison
I was a bit vague on the description of the problem.

The {read field values, and store elsewhere} is my client program storing
the data elsewhere on the client system, as opposed to any database
modification.

Assuming that the TIB_Cursor doesn't keep the already read records in
memory, it sounds like about what I need (I was using TIB_Query for some
reason).


Thanks to you and Lucas.


Bill

-----Original Message-----
From: Helen Borrie (TeamIBO) [mailto:helebor@...]
Sent: Thursday, January 10, 2002 7:57 PM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Unidirectional Cursor


At 03:35 PM 10-01-02 -0800, you wrote:
>What would be the best IBO component/settings to do something like :
>
>prepare;
>first;
>while not eof do
>{read field values, and store elsewhere}
>next;
>close;

Bill,
TIB_Cursor is the obvious choice for doing this task if has to be done
client side...but if it's not needed in the GUI, why not do it in the
database in a SP? The processing is identical but there is no fetching and
sending back.

create procedure rollthru (input1, input2, ...)
as
declare variable v1 integer;
declare variable v2 char(8);
declare variable ....
begin
for select <the stuff that would have been in your SQL property>
where columna = :input1
and columnb = :input2
and...
into :v1, :v2, ...
do begin
do stuff
....
end
end

Using an IB_DSQL, with SQL:

execute procedure rollthru (:arg1, :arg2, ...)

Pass the parameter values to the IB_DSQL in BeforeExecute and there you have
it - untouched outside of the database.


regards,
Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at
www.ibobjects.com



___________________________________________________________________________
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 http://docs.yahoo.com/info/terms/