VCursor lock question

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Wed Oct 9 03:05:46 CDT 2013


On 10/9/13 10:19 AM, "Bart Pietercil" <bart.pietercil at cognosis.be> wrote:

> 4) if you don't want to move your business logic into a stored procedure you
> can write your own locking mechanism that every client will check before
> attempting to modify records (table properties could be used for that , or
> temp fields or Š)

Why?

Simple 

  curs = db.SqlSelect(  "SELECT ... WHERE ", kReadWrite  )

Now this user have LOCK some set of records.
So he can easy do in loop many calls to vserver

    loop
    {
            curs.field( f1 ) = NewValue
            curs.Update()

            curs.NextRecord()
    }


Other users will not be able modify this records.
They can only read it until user1  unlock the,

They are unlocked, when cursor dies

    curs = nil




-- 
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