I wrote:
>>Hi all,
>>Is there any way for a user process to get the actual name of an open
>>data base? I'm looking for the fully-qualified MPE filename of the root
>>file that was actually opened.
To which Paul Christidis responded:
>1. getprivmode; <<root file's file code is -400>>
> fnumber := fopen (DBname,1,,,,,,,,,,,-400);
> ...fgetinfo (fnumber,MPE'file'name);
> getusermode;
>
Based on Paul's suggestion, I tried this using FLABELINFO instead of
FOPEN/FGETINFO. It works without priv mode and doesn't have the remote
possibility of deleting the data base that Paul mentioned. It also works if
the data base is opened in exclusive mode. Unlike Paul's method, though, it
does not work for a remote data base. This happens to be fine in the
application I'm working with.
Thanks!
-- Bruce
---------------------------------------------------------------------------
Bruce Toback Tel: (602) 996-8601 | G is for Garbage. He whose sin
OPT, Inc. (800) 858-4507 | It was to put such input in
11801 N. Tatum Blvd. Ste. 142 | By rule must stand beneath the spout
Phoenix AZ 85028 | When his output's coming out.
[log in to unmask] | -- The Programmer's ABCs
|