Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error Message when trying to reindex a table in a method
Message
 
 
À
21/06/2007 09:59:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01234687
Message ID:
01234691
Vues:
10
Is it a single-user application?

Also perhaps you should try to use different alias, since Users for some reason looks like a reserved word.

Also always put an attempt to open a table exclusively into the try/catch block, since it may fail.

If you're using AGAIN clause it doesn't change the mode the table already opened in (e.g. it may be already opened in shared mode under different alias and using AGAIN would not open it exclusively).

From the Help file:
When you open a table again in another work area, the table in the new work area takes on the attributes of the table in the original work area. For example, if a table is opened for read-only or exclusive access and is opened again in another work area, the table is opened for read-only or exclusive access in the new work area.

I believe the Users table is already opened under different alias (or in another DS), that's why you can not open it exclusively.


>I have a form to re-index a table If I use the code
>
>IF USED('users')
>	USE IN users
>ENDIF
>
>USE users IN 0 EXCLUSIVE
>SELECT users
>
>I get the error message
>
>File in Use
>
>In the debugger used('user') is .F.. Why does VFP 9 think the file is in use? If I use the code
>
>USE users IN 0 EXCLUSIVE AGAIN
>SELECT users
>
>or
>
>USE users IN 0 EXCLUSIVE AGAIN ALIAS users
>SELECT users
>
>I do not get the above error message, but in the code
>
>lnNoTags	= TAGCOUNT('users')
>
>DIMENSION alcTagInfor[lnNoTags,6]
>
>=ATAGINFO(alcTagInfor,'users')
>
>FOR lnCnt = 1 TO lnNoTags
>	lcTagNane		= ALLTRIM(alcTagInfor[lnCnt,1])
>	lcTagExpression	= ALLTRIM(alcTagInfor[lnCnt,3])
>	lcTagOrder 		= ALLTRIM(alcTagInfor[lnCnt,5])
>	DELETE TAG &lcTagNane
>	INDEX ON &lcTagExpression TAG &lcTagNane &lcTagOrder
>NEXT
>
>I get the error message
>
>File must be open exclusively
>
>on the "Delete Tag ..." line.
>
>What file is VFP 9 looking at?
>
>Why am I getting these error messages and how do I fix this problem (using Stonefield STD is not an option)?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform