Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
USED() with non .dbf extension
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00276954
Message ID:
00276966
Vues:
23
>Ok, this might seem wierd but,
>
>I have a file on disk call 'MyFile.cnv'. It's just a VFP table with a wierd extension. In a method I have:
>
>cTableName = 'c:\MyFolder\Myfile.cnv'
>THISFORM.cFile = JUSTFNAME(cTableName)
>cStem = juststem(thisform.cFile)
>
>Now, if I use the table in the default DataSession. Run my form (it has a private datasession), and call that method all of the following return .F.
>
>used(cTableName)
>used((cTableName))
>used(juststem(thisform.cFile))
>used(thisform.cFile)
>used((thisform.cFile))
>used(cStem)
>used((cStem))
>used(dbf( any of the above )) fails with a 'No Alias found' error.
>
>Shouldn't at least 1 of the above return .T.
>
>The only workaround I could find was trying to open it with LLFF
>
>x = fopen(cTableName)
>if x = -1
>? 'open'
>else
>? 'not open'
>endif
>
>Anybody have any ideas?

Well... if you opened the file in the default data session, and run the above code in the private data session of the form, they should all return .f.

That is the point of a private data session.

BOb
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform