Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't open a table exclusively
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00313297
Message ID:
00313327
Vues:
32
>I am using Visual Maxframe Professional. When you start an application it loads all of the tables automatically.
>
>I have a form where I need to open a table exclusively so that I can zap it. I am not having any luck accomplishing this.
>
>Everytime I try to use the table exclusively I get the error "File in use". I have tried selecting the table and issuing a use command to close the table first but this doesn't help either.
>
>Any ideas?

Have you subclassed the ctrApp class yet to something like ctrMyApp? If so, you can override the ctrMyApp.SetupTables() method with something like this:

LPArAMETERS tcDatabaseName, tlDisplay

IF DODEFAULT(tcDatabaseName, tlDisplay)
IF USED( "MyTableName" )
USE IN MyTableName
ENDIF

RETURN .T.
ELSE
RETURN .F.
ENDIF

This is slightly inefficient, as the table is opened and then closed, but nobody ever said I was a pretty programmer < g >.
Chris McCandless
Red Sky Software
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform