[V4RB] How should I use UpdateAll?

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Mar 20 15:20:26 CST 2003


on 3/20/03 2:22 PM, Richard Altenburg at valentina at brainchild.nl wrote:

> The class VCursor has a method UpdateAll with which I should be able to
> update one or more fields in more than one records of a table in one call.
> 
> The Valentina for REALbasic Reference tells me that "this function is much
> faster then iteration of cursor records in loop to assign new values".
> 
> I believe that immediately, but I do not have it working yet.
> 
> I have this cursor that represents one field in thousand of records, that I
> acquired by doing an SQL SELECT (of course).
> 
> I set the CurrentPosition in the cursor to 1 (although the reference says it
> does not matter which one is current), change the value of the only field in
> the cursor, and do an UpdateAll.
> 
> After checking, there is not one record changed.
> 
> So at this point I still loop through thousands of records, moving the
> CurrentPosition one by one. It is reasonably fast, but I know UpdateAll
> would do this much more efficient.
> 
> Anyone can help me?

Hi Richard,

Better to use SQL command  -- UPDATE ... WHERE

UpdateAll() was added to Valentina before that SQL command was implemented.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list