Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 1709: Database Object is being used by someone else 1

Status
Not open for further replies.

chpicker

Programmer
Apr 10, 2001
1,316
I'm getting this error seemingly randomly ever since I made a new version of the software live. The line number that it is happening on is this line:
[tt]
USE (cTable) IN 0 ALIAS zone1 NODATA
[/tt]
cTable contains one of 2 names: either "ridedata!calls_dispatch" or "ridedata!calls_vehnum". These refer to views stored in the database.

Looking up the MSDN help on this error, it gives 3 possible causes for this error. The second and third aren't possible (no one is modifying the view), which leaves me with the first one:

"Visual FoxPro is accessing records temporarily in response to another user’s actions. Wait a few minutes and try again."

Well, I can certainly understand the "wait a few minutes and try again", but what the heck does the first sentence mean? I can't make any sense out of it whatsoever.

Does this mean that more than one user is trying to open the view at the same time? I know more than one user can HAVE it open at the same time, but perhaps trying to open it at the same time is the problem. Does Visual FoxPro not allow this? Is it safe to just trap this error and retry?

On the other hand, if this IS the problem, it might just break my code. I might have to re-do this part of the program without a view, but rather just use a SELECT statement with a relation to the original table for updates. That will take awhile...

Ian
 
Ian,
The DBC's View record is locked for a while when the view is opened, and during this time a second person can't access it! A number of "smart" VFP people have recommended creating a local (temporary) DBC for each user just with your views in it, to eliminate this possibility. For a more comprehensive discussion go to
Rick
 
Thanks, Rick, that's what I was afraid of.

Luckily, a simple error trap for 1709 in a DOEVENTS loop fixed the problem. *grins*

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top