Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, Community,
How can we create a dynamic connection, e.g, we have two servers and both having the DB.
What i want if one server is down, then Qlikview connect to other server automatically...
it seems simple. but dont have enough experience to deal with...
Kindly Help.
Kind Regards
Sort of. Set error mode to 0 (SET ErrorMode = 0;) so the script will continue when an error is encountered. Add two load statements for both databases. The second one should be in an if-then block. In the if condition check the value of the scripterror variable to check for database related errors. For example a scripterror value 9 means the database was not found. You can find the error codes and their meaning in the help file. Alternatively you could just check if the table that should have been created exists and/or if there are any rows in it using the TableNumber and/or NoOfRows functions.
Dear Gysbert,
Thank You For Your Reply. some one told me this script,
what you will say about this.?
SET ErrorMode = 0;
ODBC CONNECT TO DB1;
IF ScriptErrorCount > 0 THEN
ODBC CONNECT TO DB2;
END IF
SQL SELECT * FROM db;
Kind Regards
Hi Usman,
Yes, it exactly works, if one server is not reachable then the ScriptErrorCount would be > 0, so in the If condition the ODBC is connected.
SETErrorMode=0;
ODBC CONNECT TO DB1;
If ScriptErrorCount > 0 Then
ODBC CONNECT TO DB2;
End If
SQL SELECT * FROM db;
Hope this helps you.
Regards,
Jagan.
Thank You Mohan,
let me try..
i 'll update you
Kind Regards