File locked by Context #

Startbeitrag von Harry am 04.06.2010 07:49


I want the change a record with Hmodify.
Windev gives me

File locked by Context #

What is the problem ....

Kind regards, Harry


the problem is ,i believe,in locking,other user has locked either the file,or the record.


von Novica Njagojevic - am 04.06.2010 08:08
Hello Novica,

Thnaks for your reaction,

You are right, i locked the record in a window and then i open a next window to do something with the record.
But.. I use "Independent Hyper File content" so i think that HModify cannot be executed because the record is locked by "another window".

The problem is solved but are records locked on 'Window level" ? when you use ""Independent Hyper File content" ?

Thanks, Harry

von Harry - am 04.06.2010 08:38
Records are locked at the database level. Records are locked for everybody but the context that set the lock.


von Michel - am 04.06.2010 15:45

Independent HF conetxt means that if you have an record in window A
an you start then window B ,in window B you dont have access to record in window A.
In that case you should do an seek in window B.

In case when you dont have independent context switched on,your record from window A is
visible in window B.

BUT,that has nothing to do with record locking. Record locking is done on database engine level (HFSQL or other). And you should have an response that record is locked (from the DB) even if a third parti app is accessing your DB and locks records.
So when you do HreadSeekFirst (or other Hread commands) you MUST test if the record is locked,with the next command : IF ErrorLock THEN , try later or give a user a message to wait. You have an example named : Wd who is locking,so you can see how WD is locking records.

von Novica Njagojevic - am 04.06.2010 15:48
Zur Information: hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.