Open a DBF without extension using the DbUseArea() function

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
Irwin
Posts: 88
Joined: Wed Mar 23, 2022 10:24 am
Location: España

Open a DBF without extension using the DbUseArea() function

Post 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.
Post Reply