Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement