[VAPP/AS] RecordLock... again

Kurt Klamp K.Klamp at t-online.de
Thu Feb 19 21:44:34 CST 2004


Ruslan Zasukhin <sunshine at public.kherson.ua> wrote:

> on 2/19/04 5:30 PM, Kurt Klamp at K.Klamp at t-online.de wrote:
> 
> > Hi Ruslan,
> > 
> > coming back to the last discussions with this issue.
> > After some testing of this feature, i'm  disappointed. Either i didn't
> > understand to use it or it doesn't work with VAPP/AS.
> > 
> > if i build a 'readonly' cursor  there is no chance to build another one
> > (readonly too) including the same records of  a bo.  Error-> 'Can't set
> > recordlock'
> > 
> > if if use the 'knolock' in the first cursor --> same result as above
> 
> Hi Kurt,
> 
> I have open this 3 params to AS ?
> Not remember

Yes its in the AS dictionary since 1.10
 
Seems you even work while you sleep :-)

> 
> Can you show HOW you create cursor and HOW you specify locks?

Just simple. Take the example database 'DataBase4' which is shipped with
VAPP. 

set db to database "database4"
set sqlstr to "select * from task where left(name,7)='task 5' order by
status desc"
set crs1 to SQL db Select sqlstr LockType kReadOnly Direction kRandom
--count records in crs1 --> must be 444
set thevalue to get (field 4 of record 1 of crs1)
set sqlstr to "select * from task where status=" & thevalue & " order by
status desc"
set crs2 to SQL db Select sqlstr LockType kReadOnly Direction kRandom
^^^^
here i get the error 'Cannot set record lock
    
Best, 
Kurt


More information about the Valentina mailing list