Error in method saveas

zenaculo

New Member
after I to create an application excel and modifies it happens an error progress in the method saveas when I try to save my table in a unit of net which I do not have permission. how I could treat this error progress so that it is shown in one alert-box and not in an error progress?:confused:
 

Patrickorigo

New Member
As I understand you are trying to write a file to a networked drive where you don't know if you have permission to write.
One way to find out is to do it like this

DEFINE VARIABLE LC_catalog AS CHARACTER NO-UNDO.
LC_catalog = "Z:\".

FILE-INFO:FILE-NAME = LC_catalog.
IF FILE-INFO:FILE-TYPE = "DRW" THEN DO:
...... (write the file)
END.
ELSE DO:
MESSAGE "No permission to write".
END:

Here you validate if it's a directory and that you have permission to read and write.
 

zenaculo

New Member
As I understand you are trying to write a file to a networked drive where you don't know if you have permission to write.
One way to find out is to do it like this

DEFINE VARIABLE LC_catalog AS CHARACTER NO-UNDO.
LC_catalog = "Z:\".

FILE-INFO:FILE-NAME = LC_catalog.
IF FILE-INFO:FILE-TYPE = "DRW" THEN DO:
...... (write the file)
END.
ELSE DO:
MESSAGE "No permission to write".
END:

Here you validate if it's a directory and that you have permission to read and write.



yes this function was a big help.

thanks Patrickrorigo o//
 
Top