FoxInCloud
Record is in use by another user (Error 109)
Gravatar is a globally recognized avatar based on your email address. Record is in use by another user (Error 109)
  Vincent H.
  All
  Jul 30, 2019 @ 06:25am

Hi Thierry,

I have this new error:
Awajax.useraction() - Erreur dans l'exécution de la méthode 'annexes_scx.pageframe1.activepage= m.this.uValue' : Méthode ou procédure refresh_() : erreur n° 109 ("Record is in use by another user") à la ligne n° 7 ("REPLACE Annexesman WITH Mnb_d IN Avant_c")

In debug mode, I have no error.

Thanks in advance

Gravatar is a globally recognized avatar based on your email address. re: Record is in use by another user (Error 109)
  FoxInCloud Support - Thierry N.
  Vincent H.
  Jul 31, 2019 @ 08:13am

This error occurs probably because 2 COM servers attempt to lock the same record of the avant_c table.

FWIW, VFP automatically locks some or all records when executing commands such as APPEND, REPLACE, etc. (see 'locking data' in VFP9 help)

Make sure to use such command only when useful, and narrow the scope as much as possible: eg. avoid REPLACE ALL that locks all records in the table.

Also make sure to set reprocess to a suitable value.

The FoxInCloud Error Analyzer (/wc.wc?FoxInCloud~wFrmLogError) can also help you understand the context when the error occurs:
https://www.dropbox.com/s/h4il0yo1h1mqi53/Capture%20d%27%C3%A9cran%202019-07-31%2017.10.54.png?dl=0

Gravatar is a globally recognized avatar based on your email address. re: Record is in use by another user (Error 109)
  Vincent H.
  FoxInCloud Support - Thierry N.
  Jul 31, 2019 @ 08:43am

Yes, but the message appears systematically and the REPLACE is done only on a record.

And why would this behavior be different in debug mode ?

I have bypassed the problem but I do not understand the cause.

Gravatar is a globally recognized avatar based on your email address. re: Record is in use by another user (Error 109)
  FoxInCloud Support - Thierry N.
  Vincent H.
  Jul 31, 2019 @ 09:29am

This happens because, when the replace attempts to execute, it finds a lock set on the record by another VFP process, probably another FoxInCloud COM server, or a table maintenance routine if any.

Debug mode runs only one VFP process (the VFP IDE) so there's no chance a record lock contention may happen.

Gravatar is a globally recognized avatar based on your email address. re: Record is in use by another user (Error 109)
  Vincent H.
  FoxInCloud Support - Thierry N.
  Jul 31, 2019 @ 10:20am

ok, thanks for the explanations

© 1996-2019