Next beta will have record locks.

erne ernestogiannotta at tiscalinet.it
Tue Jul 1 13:16:28 CDT 2003


on 1-07-2003 12:37, Ruslan Zasukhin at sunshine at public.kherson.ua wrote:

>> That's great, Ruslan!
>> 
>> I don't understand well the need of ForwardOnly and why it's set as default
> 
> Parameter ForwardOnly is optional.
> 
> When you make cursor Forward Only then you say to database that you will
> iterate this cursor ONLY once from start to end.
> 
> So when you do NextRecord() database knows that you never return on the prev
> record so it CAN remove lock from this record. As result we increase chance
> that other user can lock this record for his needs.
> 
> If you need iterate a cursor few times, or move from back to start,
> You need specify kRandom, then records will remain locked during the whole
> life of cursor.  
> 
> 


Thanks Ruslan,

so if we call a cursor as Locked, all its records get the locked status

Can't we lock/unlock on a record basis?

What happens if another call try to build a Locked cursor that includes
records already Locked?

e.g.

c1 = SqlSelect(query, kClient, kWrite, kRandom)

c1 has 3 records recid 1,2,3

c2 = SqlSelect(otherquery, kClient, kWrite, kRandom)

c2 has 3 records recid 3,4,5

you see? recid 3 is already locked
what we expect now?


Cool Runnings,
Erne.

-- 
|  e r  |  Ernesto Giannotta
|  n e  |  Musical Box - a media store
                   




More information about the Valentina mailing list