General information
Category:
Coding, syntax & commands
>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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only