updating values in a VCursor
Steve Albin
steve at steve-albin.com
Sat Apr 26 13:54:57 CDT 2008
Thanks Ruslan. The idea to do it this way seemed logical when I started because it would be so easy for me. Now that I think about it more, it just doesn't make sense that it should work.
I'll use a TMP table.
Thanks again,
Steve
--
Steve Albin - Montclair, NJ - USA
http://www.jazzdiscography.com/
http://www.steve-albin.com/
On Saturday, April 26, 2008 sunshine at public.kherson.ua (Ruslan Zasukhin) wrote:
>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
>
>
More information about the Valentina
mailing list