>Views-a-plenty.
>
>
>>Are you using views in your DE?
>>
>>>>Ok, this is a last ditch effort before I call Microsoft. One of my applications has begun throwing 1709 (Database object is in use by someone else) often enough to make my users want to kill me.
>>>>
>>>>I have yet to get a clear picture of what causes this error. A search on the MSKB turned up an article that recommends a simple RETRY in the error handler when this pops up. So I put this in the very first line of my ON ERROR routine. Now, instead of popping up an error message, I get "Mismatched Pushjmp/ Popjmp" from VFP (this is not a trappable error), and clicking ok causes the program to quit.
>>>>
>>>>I just spoke to a user that said this happened to her 5 times already this morning. This is the only app I've written that has this problem... what is going on?
>>>
>>>Forgot to mention- the 1709 is always thrown from the DataEnvironment.OpenTables method.
Erik,
Ed Leafe of the Codebook forum (
http://codebook.leafe.com) offered a solution a few weeks ago. Here is the message.
... I ran across this at my current client's location, and came up with this fix. It involves adding code to the Error() method of cDataEnv's cDataEnvironment class. Here is the code for that method:
FUNCTION Error(nError, cMethod, nLine)
IF nError = 1709
* DBC in use error
SET MESSAGE TO "DBC in use; please wait..."
* Pause for a brief instant before retrying
=INKEY(.1)
RETRY
ELSE
ERROR(nError)
ENDIF
RETURN
ENDFUNC
What this does is trap the "DBC in use" error and pause briefly before retrying to access whatever information it needs (usually a view definition).
José