Subject Re: getfile method problem
From Charlie <tm@tc.com>
Date Sun, 21 Apr 2024 09:32:22 -0400
Newsgroups dbase.getting-started

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
getFile("c:\dbasewin", "Choose Files", false) >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.

Yet oodml tables still work.

I do realize that using oodml with xdml functions can cause problems, but I have always been able to either get a work around or fix them.  Just much easier for me to work with xdml with the type functions I am using them for.  

If it was just one computer, I'd say maybe I need to reinstall windows again, but both???


Mervyn Bick Wrote:

> On 2024/04/21 01:13, Charlie wrote:
> > is there something wrong with this newsfield..  I have replied twice and don't see either..  At any rate Ken, I tried both true and false and same results.
>
> Like Ken, I haven't been able to replicate this.  It does, however, add
> weight to the precept "It's better not to mix OODML and XDML".
>
> Instead of using OODML to instantiate the array together with the array
> object's getfile() method,  try using the XDML GETFILE() function.
>
> OODML
> path1 = trim(form.memo1.rowset.fields["pics"].value)
> a = new array()
> a.getFile(path1+"\", "Choose Files", false) > 0
>
> XDML
> cfile = getFile(path1+'\', "Choose Files", false)
>
> Mervyn.