I am testing the following code in TOAD.
create directory test_dir AS 'c:\';
DECLARE
fileHandler UTL_FILE.FILE_TYPE;
BEGIN
fileHandler := UTL_FILE.FOPEN('test_dir', 'test_file.txt', 'W');
UTL_FILE.PUTF(fileHandler, 'Test writing to a file.\n');
UTL_FILE.FCLOSE(fileHandler);
EXCEPTION
WHEN utl_file.invalid_path THEN
raise_application_error(-20000, 'ERROR: Invalid PATH FOR file.');
END;
It returns the following error:
Error at line 1
ORA-20000: ERROR: Invalid PATH FOR file.
ORA-06512: at line 9
Could anyone tell me how to resolve this error? Thanks so much!