Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody,
I need to connect to a QV server in the script and make it throw a script error if the connection can't be established. I tried to do the following:
SET ErroreMode = 0;
CONNECT to '[http://servername/qlikview/index.htm'; | http://servername/qlikview/index.htm';]
if ScriptError > 1 then
SET ErrorMode = 1;
SET vURL = False
exit script;
end if
SET ErroreMode = 1;
SET vURL=True;
Basically, all I need is to know, if the server is available and set the variable accordingly. The topic has already been discussed, but I can't get it working for me.
Thank you for any advice,
Christian
Would pinging the server help?
http://community.qlik.com/message/80817#80817
You could also turn that to a function and check. Like done here: http://community.qlik.com/message/194528#194528
Otherwise, you could load something from your web page. You can generate load script using "Web File" load button in the script editor.
Hope this helps.
Would pinging the server help?
http://community.qlik.com/message/80817#80817
You could also turn that to a function and check. Like done here: http://community.qlik.com/message/194528#194528
Otherwise, you could load something from your web page. You can generate load script using "Web File" load button in the script editor.
Hope this helps.
Hi Rakesh,
I did the latter and it worked for me. Thanks for your advice.
Great! Glad I could help.
Possible you could please put steps here what you did to resolve? I see this question pops-up here many times. Community will surely appreciate your efforts.
Thank you!
Below is the code I use now. A field from the page is loaded and dropped again at the end of the script.
set ErrorMode=0;
LOAD F1
FROM
[http://servername/qlikview/index.htm]
(html, codepage is 1252, embedded labels, table is @1);
if ScriptError > 1 then
DROP Field F1;
SET ErrorMode = 1;
SET vURL = False;
exit script;
end if
DROP Field F1;
SET ErrorMode = 1;
SET vURL = True;
Thank you!