Yangxuelin
28th August 2008, 11:36
Use db.Update()
Error: Error 206 (Record is not locked) on tdinv900141 in db_update(51)
Can not continue in tdinv9113s000 in DLL:ottstpstandard(rcdset.modify) [db.update]

Help??????

vahdani
28th August 2008, 13:51
Hi,

this is caused bei prorgaming error. As this is not a standard prorgam or table you should cantact the programer.

Background: when selecting records these must be marked "for update" otherwise no delayed lock is set.

correct:


select *
from tdinv900 for update |< here
where .......
selectdo
......
db.update(ttdinv900, db.retry)
endselect

Yangxuelin
29th August 2008, 05:38
Thank You Very Much!

Yangxuelin
29th August 2008, 05:57
Use for Update

db.retry.point()
select whinh000.*
from whinh000 for update
where whinh000._index1 = {:whinh901.idat}
order by whinh000._index1 desc with retry
selectdo
if whinh900.bcyc = tcyesno.yes then
whinh000.bcyc = tcyesno.yes
else
whinh000.bcyc = tcyesno.no
endif
db.update(twhinh000,db.retry)
commit.transaction()
return(0)
selectempty
mess("whinh9113.001",1)
endselect
commit.transaction()

But still have is error:Record is not locked ..................

vahdani
29th August 2008, 09:29
Hallo Xuelin,

I am a bit confused now :confused:. Does the error come for tdinv900 as in your first post or for whinh000?

I think you have to post the complete script.

Tip: To make your code more readable use the "#" button to wrap your code in [code]-tags and change the starting tag to [code=baan]