Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Sometimes I have a server task failing due to certain files being used by another script at the exact time.
I am wondering if it is possible to write code that bypasses this? I mean, is it possible to make the script move past a file IF it is already in use by another process, instead of stopping the script reload and throwing an error?
I am also wondering if this might be a good idea at all?
I was trying to replicate your issue in vain. Then I went back to your first post, uhh - this error is not actually been thrown by qlikview during load process, rather it's prior to that and by windows os. Therefore, not in the scope of qv error handling. In such cases - follow process as Bill Britt suggested.
Hi,
As per Qlikview behavior is not supported.
you can skip warnings but not errors.
Regards
ASHFAQ
set ErrorMode=0;
Example:
load * from abc.qvw;
if ScriptError=8 then // see help for different types of error . Here 8 means 'No file is found'
exit script;
//no file;
end if
Thank you. I did not realize this existed. My error is not on the list ("The process cannot access the file because it is being used by another process"). Is this windows specific and therefore not listed as a "QV Error"? (I am a beginner at this, so please bare with me )
Yes, you are right here.
But for such case, I would try to catch the error using ScriptErrorDetails and then conditional script.
Read the attached document please
Hi,
Maybe you need to look at you scheduling and try to fix it so the reloads are not using the same files. You can do this with dependences.
Bill
Exactly agree with bill.
You cannot handle this in Qlik.
This is not related to Qlik, This is something related to file sharing.
Regards
ASHFAQ
tresesco wrote:
But for such case, I would try to catch the error using ScriptErrorDetails and then conditional script.
Could you please elaborate some more on this? Would that enable me to bypass the error or just give me more information? Since it is windows specific..
I was trying to replicate your issue in vain. Then I went back to your first post, uhh - this error is not actually been thrown by qlikview during load process, rather it's prior to that and by windows os. Therefore, not in the scope of qv error handling. In such cases - follow process as Bill Britt suggested.