updating values in a VCursor
Ruslan Zasukhin
sunshine at public.kherson.ua
Sat Apr 26 12:51:25 CDT 2008
On 4/26/08 7:43 PM, "Steve Albin" <steve at steve-albin.com> wrote:
Hi Steve,
> I am using RB2008r1 and V4RB 3.01.
>
> Let's say I do a query that returns a few hundred records to a cursor. I
> would like to iterate through the cursor and update some fields, but not
> update the record in the database. Then, I would like to iterate through the
> cursor again to access the updated fields. What I am finding is that the
> updates made to the cursor are not saved once I move off that record.
Valentina do not support such behavior.
> Here is a pseudo-code example of what I would like to do:
>
> Select fld1, fld2, fld3 from table1
>
> do
> myCursor.Field(2).SetString "new info"
> go to next cursor record
At this point your New Value is lost.
it is stored in the CURRENT RECORD buffer of cursor.
but you have move to new record, so new values are LOADED.
they erase your new value.
> loop until endOfCursor
> myCursor.position = 1
>
> do
> msgbox myCursor.Field(2).GetString
> go to next cursor record
> loop until endOfCursor
>
> Fields fld1, fld2, fld3 are VString fields.
>
> The msgbox displays the original value of the field and not the "new info"
> literal value I set it to.
>
>
> I am assuming that what I am trying to do is allowed in Valentina, maybe it is
> not. If this is allowed, what am I doing wrong?
May be you need use TMP table for this task
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list