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

On 2024/04/21 16:29, Mervyn Bick wrote:
> I still can't replicate this.

I've managed to replicate this at last.  It only happens if you return
from GETFILE() without selecting a file.

The work-around is to test the value returned by GETFILE() and if
nothing has been returned set the database.

use fish.dbf
cfile = getFile("d:\examples\", "Choose Files", false)
if empty(cFile)
    set database to dbasesamples
endif
use fish.dbf
list
use
?'cfile',cfile

dBASE doesn't get upset if you set an already set database so try this

use image.dbf
cFile = getFile("c:\dbasewin", "Choose Files", false)
set database to databasename
use image.dbf


Mervyn.