xsharp.eu • Open a DBF without extension using the DbUseArea() function
Page 1 of 1

Open a DBF without extension using the DbUseArea() function

Posted: Sat Dec 28, 2024 6:48 pm
by Irwin
Hi Robert,

I have a legacy (VFP) program that uses a DBF as a configuration file but it hasn't extension eg: "config" instead of "config.dbf". In VFP you can open this file like this:

Code: Select all

USE c:\my\path\to\config. && note the dot (.) at the end.
When I open the file using the DbUseArea(...) then I get the FileNotFound exception: File not found "config.dbf" the function adds the .dbf if the file doesn't provide it. Is there a way to open a DBF file without providing its extension or even better, providing any extension eg: scx, vcx, etc?

thanks.