Hi,
As per the Manuals.. Use FILE( ) to find a file on disk. FILE( ) returns true (.T.) if the file can be found; otherwise FILE( ) returns false (.F.).
But I fould that it is not true. I included many reports in a project and compiled the executable. I have coded in such a way ... to find out, if some report files were physically put in the users computer, it will be identified by the FILE() function and use that. Otherwise, create a report file on the fly from some stored tables (special creation by me) and use them. The problem started because the report files were also included by me in the project(though it is not necessary in my case).
Problem.. FILE() function always returns .t., if the report file stays included in the project executable, but not available in DISK (because... my routines look for the file in DISK when .t. is returned by FILE(), but not available).
No problems.. if my special tables are used.. and if files kept on the user computer as specified .. but the files stands excluded from the project.
The QUESTION here is, the FILE() function not behaving as per the specification. Can some one point out.. if I am going wrong somewhere?
Interestingly.. LOCFILE() also did the same behaviour in my limited testing. LOCFILE() is supposed to open up a dialogue when file is not found. But the round about way is..
IF JUSTFNAME(LOCFILE(...myFile...)) == myFile ..
I am getting a similar response like FILE().. and guiding me wrongly.
Is there any other alternative to avoid this ?
Thanks and regards to members who may try out for me
Ramani
ramani
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
As per the Manuals.. Use FILE( ) to find a file on disk. FILE( ) returns true (.T.) if the file can be found; otherwise FILE( ) returns false (.F.).
But I fould that it is not true. I included many reports in a project and compiled the executable. I have coded in such a way ... to find out, if some report files were physically put in the users computer, it will be identified by the FILE() function and use that. Otherwise, create a report file on the fly from some stored tables (special creation by me) and use them. The problem started because the report files were also included by me in the project(though it is not necessary in my case).
Problem.. FILE() function always returns .t., if the report file stays included in the project executable, but not available in DISK (because... my routines look for the file in DISK when .t. is returned by FILE(), but not available).
No problems.. if my special tables are used.. and if files kept on the user computer as specified .. but the files stands excluded from the project.
The QUESTION here is, the FILE() function not behaving as per the specification. Can some one point out.. if I am going wrong somewhere?
Interestingly.. LOCFILE() also did the same behaviour in my limited testing. LOCFILE() is supposed to open up a dialogue when file is not found. But the round about way is..
IF JUSTFNAME(LOCFILE(...myFile...)) == myFile ..
I am getting a similar response like FILE().. and guiding me wrongly.
Is there any other alternative to avoid this ?
Thanks and regards to members who may try out for me
Ramani
ramani
(Subramanian.G),FoxAcc, ramani_g@yahoo.com