Web Connection
wwBusiness error 108 - File is in use by another user
Gravatar is a globally recognized avatar based on your email address. wwBusiness error 108 - File is in use by another user
  Michael Hogan (Ideate Hosting)
  All
  May 1, 2020 @ 07:28am

Does wwBusiness "error 108 - File is in use by another user" mean I have to repair the dbf, or does it mean I should:

SET TABLEVALIDATE TO 0 or SET TABLEVALIDATE TO 2

It appears to happen when selecting an already open table here: IF USED(lcAlias) SELE (lcAlias) ELSE

Gravatar is a globally recognized avatar based on your email address. re: wwBusiness error 108 - File is in use by another user
  Tore Bleken
  Michael Hogan (Ideate Hosting)
  May 1, 2020 @ 09:06am

No, the error message means that the table is used Exclusive somewhere in your code, or by someone else.

Make sure that you have Set Exclusive Off early in your code.

Gravatar is a globally recognized avatar based on your email address. re: wwBusiness error 108 - File is in use by another user
  Michael Hogan (Ideate Hosting)
  Tore Bleken
  May 1, 2020 @ 12:25pm

I've got that covered, thanks... Exclusive is off and no file locking. Something else is going on.

Gravatar is a globally recognized avatar based on your email address. re: wwBusiness error 108 - File is in use by another user
  Rick Strahl
  Michael Hogan (Ideate Hosting)
  May 1, 2020 @ 05:30pm

Are you really sure there's not something else keeping the file open? Some other application that's hung perhaps? Or another user logged into your machine?

This is not a VFP file locking error but that looks like the lower Windows error is being triggered.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: wwBusiness error 108 - File is in use by another user
  Michael Hogan (Ideate Hosting)
  Rick Strahl
  May 2, 2020 @ 10:44am

There may be an RLOCK() going on in wwbusiness but that wouldn't prevent a USE from another instance - would it?

I'll have to figure out how to check the status of other instances when this happens... or maybe change to a try/catch to retry a few times before it errors out...??

Gravatar is a globally recognized avatar based on your email address. re: wwBusiness error 108 - File is in use by another user
  Rick Strahl
  Michael Hogan (Ideate Hosting)
  May 3, 2020 @ 01:48am

For locking issues I use:

SET REPROCESS TO 2 SECONDS

to ensure that any table lock that is quick won't break the app. It's rare that anything takes more than 2 seconds on the Db, much less anything that needs to lock the table.

An RLOCK() won't hold up a USE statement though, but may affect write operations. Lock errors throw a different exception though - there are specific error messages that say that there's record or table lock, so I don't think that's what's happening in your case.

As Tore points out file is in use errors are either caused by EXCLUSIVE use of a table by another user, or by bona fida open file from another application that is somehow locking it (ie. not a FoxPro lock, but some other OS lock).

It could also come from a low level file operation or copy operation. That errors can be very broad.

+++ Rick ---

© 1996-2020