Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Re: Bypassing QV script error?

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.

10 Replies

Re: Bypassing QV script error?

Hi,

As per Qlikview behavior is not supported.

you can skip warnings but not errors.

Regards

ASHFAQ

MVP
MVP

Re: Bypassing QV script error?

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

Re: Bypassing QV script error?

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 )

MVP
MVP

Re: Bypassing QV script error?

Yes, you are right here.

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

sujeetsingh
Honored Contributor III

Re: Bypassing QV script error?

Read the attached document please

Error Handling in Qlikview

Employee
Employee

Re: Bypassing QV script error?

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 

Re: Bypassing QV script error?

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

Re: Bypassing QV script error?

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

MVP
MVP

Re: Bypassing QV script error?

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.

Community Browser