Why won't this update statement work?

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Mar 13 21:57:39 CST 2004


On 3/13/04 9:51 PM, "Kristafer Vale" <kristafer at comcast.net> wrote:

Hi Kristafer,

> The reason I want to do this is that I need to query the database for the
> record information and then feed that info into my next command which will
> update the previous information with some new data. I can't think of a
> better way to do it then, use select in a cursor, then get info from the
> cursor set to a variable, then use said variable to make new sqlExecute
> command to update info. Am I missing something?

1) if you already have cursor, then just use its functionality!

    curs.UpdateRecord()

This will be faster than
    a) PREAPRE new SQL command STRING
    b) PARSE it for Valentina
    C) execute update

More simple execute update skipping a) and b) steps.
You see?


2) IF you very want to use SQL way, then your cursor should not lock
records, use NoLock parameter


-- 
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://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list