Subject Re: getfile method problem
From Mervyn Bick <invalid@invalid.invalid>
Date Sun, 21 Apr 2024 16:29:30 +0200
Newsgroups dbase.getting-started

On 2024/04/21 15:32, Charlie wrote:
> Wow...  Blowing my mind!  Happens every time on two different computers.  One is dbase 10 and the other is dbase 11.
>
> in command:
>
> use image.dbf  > successfully opens
> >opens files successfully in both oodml and xdml
> use image.dbf  > error: file does not exist: image.dbf
>
> if i go to tables in navigator, the entire database is gone so all tables are missing.

I'm using dBASE 2019 13.20  b2618 (11/26/2019-EN191126) with Windows 10
Pro, 64-bit, version 22H2.

I still can't replicate this.

What is showing in the Look In field for the Tables tab in the Navigator
before you run your program and after the tables have "disappeared"?

What is showing in the Look In field for your Program (or Form) tab?

GETFILE() requires a backslash at the end of the path.  It helps if you
copy and paste code instead of typing it in.

getFile("c:\dbasewin\", "Choose Files", false)

GETFILE() returns the name of the file with it's path but you need to
save it to a variable to be able to use it.

cFile = getFile("c:\dbasewin\", "Choose Files", false)

With the DBASESAMPLES database selected in the Navigator's Tables tab,
running the following in a program in a different folder doesn't give an
error, the table is listed in the Results panel and when I select the
Tables tab the Look In field is still showing DBAESAMPLES and all the
files are on display.

use fish.dbf
getFile("d:\examples\", "Choose Files", false)
use fish.dbf
list
use

Mervyn.