Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File in use Error (3)
Message
De
20/02/2008 14:40:46
 
 
À
20/02/2008 14:34:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01294418
Message ID:
01294421
Vues:
15
>I have several forms which are used to remove data and re-index a database. The all have a command of the form
>
>USE &lcTableName IN 0 EXCLUSIVE ALIAS dep_year_a
>
>where &lcUTableName ia "dep_year". The alias changes depending on the form. Preceding the USE command I have commands of the form
>
>IF USED(lcTableName)
>	USE IN &lcTableName
>ENDIF
>
>IF USED('dep_year_a')
>	USE IN 'dep_year_a'
>ENDIF
>
>
>
>If I use a form to add a record and then immediately invoke the form to remove and re-index the database I get the error message
>
>Error Number: 3
>
>    Message:  File in use
>   Program Name: Program
>     Line:   n
>
>
>I know for sure if I get out of the application and re-enter it I do not get the error message, it also appears that if I invoke another form I do not get the error message.
>
>Any idea why and how to fix it?

Is it possible you are opening and closing the table in different datasessions, or that you've unknowingly left it open in another datasession?

BTW you might want to use a name expression "( lcTableName )" rather than macro expansion "&lcTableName" for this sort of thing - it's a little faster, can handle spaces in paths if present etc.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform