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

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.
  Feb 2, 2023 @ 01:14am

Hi Thierry,

I have this error again, when replacing a memo field.

It can't be due to opening the table in two different instances, because I'm replicating in localhost.

With a suspend, I find that the record does not support any modification (replace, blank or via a browse). UNLOCK() does not change anything.

The specific message is:

error #109 ("Record is in use by another user") on line #22 ("set &tcSetting &tvValueNew")

Do you have an idea and what can I send you to help me?

Gravatar is a globally recognized avatar based on your email address. re: Record is in use by another user (Error 109)
  Vincent H.
  Vincent H.
  Feb 2, 2023 @ 05:40am

Not reproducible in development mode

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.
  Feb 2, 2023 @ 12:01pm

Hi Vincent,

I'll dig into this issue shortly

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.
  Feb 3, 2023 @ 02:49am

By changing the order of loading my tables, the error disappeared. I'll keep you posted ...

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.
  Feb 3, 2023 @ 03:05am

Also see the set reprocess command

Gravatar is a globally recognized avatar based on your email address. re: Record is in use by another user (Error 109)
  Rick Strahl
  Vincent H.
  Feb 5, 2023 @ 11:25am

A record lock is a pretty clear error message if you ask me. You have a problem with multiple user/applications accessing the same file/record. This could also be due to log or session files in Web Connection or FIC.

As others have suggested, start by SET REPROCESS TO 2 seconds (or whatever is appropriate) so it applies globally and across all data sessions - you should do that anyway, for any type of application that has potential for multi-user access. Chances the Record is in use error just goes away.

A Web Connection application is basically a multi-user application if you run more than a single instance. You'll never see this problem in development because you're not running multiple instances in dev.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Record is in use by another user (Error 109)
  Vincent H.
  Rick Strahl
  Feb 6, 2023 @ 11:15am

Hi Rick,

Thanks for your explanation

I'll try SET REPROCESS TO 2 seconds

© 1996-2024