Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Repeatable C000005 - try this
Message
De
10/09/2002 14:05:14
 
 
À
10/09/2002 13:46:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00698912
Message ID:
00698931
Vues:
24
I just tested your code with VFP7 SP1 and Windows 2000 SP3 and it works fine. I get a message box with "error loading file - record number 4....error loading the dataenvironment-table is in use" error. However, I do not see my error from the load method which I believe (could be wrong) is because the form's dataenvironment before open tables event and the dataenvironment's opentables event is fired before the form's load so it never gets to it.

>Hi All,
>
>Sorry for the last post - dang send button got in the way...
>
>Try creating a form (base form class is fine) and adding an opendataerror property, initialized to .F. - Set the forms datasession to private. Add the following code to the LOAD() method.
>
>
if thisform.opendataerror
>   MessageBox("Someone is using the system exclusively")
>   return (.F.)
>endif
>
>Next up, open a file called test in the data environment. In the ERROR method of the data environment put the code.
>
>
>do case
>case nError = 1705	  && Access Denied
>	thisform.opendataerror = .T.
>case nError = 1995    && Unable to init data env
>	thisform.opendataerror = .T.
>case nError = 1967	  && Data Env already unloaded
>	* Do nothing - caused by a previous Init Error
>otherwise
>	ERROR nError,
>endcase
>
>At the command prompt, open TEST.DBF exclusive and run the form. Does yours die and excruciatingly painful death? Mine does every time. This method worked great in VFP6 but dies every single time in 7.0.
>
>Maybe I'm not phrasing my queries right, but I can't seem to find any mention of this issue anywhere out there. Is it just me? Have I finally lost it?
>
>TIA
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform