Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!

During STORE command the File Save occasionally fails

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Sonja_Bauernfeind
Digital Support
Digital Support

During STORE command the File Save occasionally fails

Last Update:

Dec 16, 2020 6:39:34 AM

Updated By:

Sonja_Bauernfeind

Created date:

Mar 23, 2017 2:53:15 PM

An example scenario:

One has approximately 20 Qlik sense applications which load data from the same source QVD. The QVD file is required to be updated at least once an hour. Should Qlik fail to secure write access on the file, a routine could be used to wait 10 seconds and retry.

Resolution/Script

SUB StoreQVTable (Table, Path) 

SET ErrorMode=0; 
Set ScriptErrorCount = 0; 
Set RC = 0; 

DO WHILE TRUE() 

STORE [$(Table)] INTO [$(Path)] (qvd); 

IF $(ScriptErrorCount) = 0 THEN 

EXIT DO 

ELSE 

Set ScriptErrorCount = 0; 
LET RC=RC+1; 

END IF 


IF ($(RC) = 10) THEN // If not yet successful, exit script 
// CALL consoleLog('ERROR: Failed to save [$(Table)] INTO [$(Path)] after 10 tries.'); 
TRACE 'ERROR: Failed to save [$(Table)] INTO [$(Path)] after 10 tries.'; 
SET ErrorMode=2; 
Load * from ERROR.qvd; 
END IF 

// CALL consoleLog('ERROR: Failed to save [$(Table)] INTO [$(Path)]. Try $(rc) of 10.'); 
TRACE 'ERROR: Failed to save [$(Table)] INTO [$(Path)]. Try $(RC) of 10.'; 
SLEEP 10000; // wait for 10secs. 

LOOP 
SET ErrorMode=2; 

END SUB

 

Labels (1)
Comments
crichter14
Creator II
Creator II

Will this also work for Qlik Sense or does a modification need to be made?

Sonja_Bauernfeind
Digital Support
Digital Support

@crichter14 This should work for Qlik Sense as well! 🙂 

dathu
Contributor
Contributor

Is STORE general exceptions errors capture in ErrorCodes. In the previous QlikView versions, it always failed even though we disabled error failure mode ErrorMode=0; 

Contributors
Version history
Last update:
‎2020-12-16 06:39 AM
Updated by: