Subject Re: [IBO] Re: TIB_Cursor not returning correct result
Author Lucas Franzen

> Interesting that you suggest removing the qry.First. Helen told me
> to replace the qry.Open with the qry.First because, according to
> her, the Open method doesn't cause a fetch.

No, she didn't.

She said/wrote: Use FIRST with a TIB_Cursor and OPEN with a TIB_Query.
You used a TIB_Query and did both.
(Maybe the confusing part is that you wrote you're using a cursor and
named it qry...)

> Here's the update procedure.
> create procedure spUpdateAveIdealUsage(iInvItemID BigInt, dUsage
> Double Precision)
> as
> Begin
> update xInvItem
> set Cycle3Ideal = Cycle2Ideal,
> Cycle2Ideal = Cycle1Ideal,
> Cycle1Ideal = AveIdealUsage,
> AveIdealUsage = :dUsage
> where (InvItemID = :iInvItemID);
> End
> I've tried the same process using an existing TIB_Query instead of
> creating dynamically and I get the same results.

Now I'm confused.

You open a Query and when it's empty you do an update.

If I understood that one right then what's the problem?

That you don't see the updated values within the Query???

You can't without Re-Opening or refreshing it.

Please enlighten me.