Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bypassing QV script error?

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?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

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.

View solution in original post

10 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

As per Qlikview behavior is not supported.

you can skip warnings but not errors.

Regards

ASHFAQ

tresesco
MVP
MVP

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

Not applicable
Author

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 )

tresesco
MVP
MVP

Yes, you are right here.

But for such case, I would try to catch the error using ScriptErrorDetails and then conditional script.

sujeetsingh
Master III
Master III

Read the attached document please

Error Handling in Qlikview

Bill_Britt
Former Employee
Former Employee

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 

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
ashfaq_haseeb
Champion III
Champion III

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

Not applicable
Author

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..

tresesco
MVP
MVP

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.