Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
c_sdg
Partner - Contributor
Partner - Contributor

Check connection script Qlik Sense

Good afternoon.

We currently have a Qlik Sense that connects to Oracle. However, this Qlik has two databases that alternate based on possible maintenance.

Is there any option to evaluate in the script which database is the one that is operational?

 

Thank you very much

Labels (3)
3 Replies
ogster1974
Partner - Master II
Partner - Master II

Set 2 connections for the DBs.

Use Qlik Error Variables to ignore the error so it doesn't stop your code running and check for the type of error which if occurs then switch to running connection 2 instead.

https://help.qlik.com/en-US/sense/November2022/Subsystems/Hub/Content/Sense_Hub/Scripting/ErrorVaria...

 

c_sdg
Partner - Contributor
Partner - Contributor
Author

Thank you!

c_sdg
Partner - Contributor
Partner - Contributor
Author

Good afternoon.

Currently we use the ErrorMode=0 to ignore any error and not to paralyze the execution. Up to here correct.

Now, as we need to apply a condition to choose between one DB or another, we make use of the ScriptError variables. Among the possible values of ScriptError, we did not find none that serves when the error is because, being the connection defined, it does not establish the connection. Given this casuistry, we cannot apply the condition ScriptError=9 (Database not found) since it exists.

The best one to apply would be ScriptError=5 (General custom database error) but it doesn't work either.

Could you help us?

Thank you.