Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I've been having a scout around the forum but haven't found anything yet. Hopefully someone can tell me if this is possible...
Can you test a connection within QlikView script? I am having the problem that with a multi-database solution that one of the databases may be taken offline for some reason but this will crash the reload. Is there anything I can do about it?
Thanks,
Chris
Hi Chris,
may you can catch the ScriptError:
set ErrorMode=0;
CONNECT ...;
if ScriptError=9 then // or ScriptError > 1
//no connect...
end if
set ErrorMode=1;
- Ralf
Message was edited by: Ralf Becher Thanks for the hint Chris!
Hi Chris,
may you can catch the ScriptError:
set ErrorMode=0;
CONNECT ...;
if ScriptError=9 then // or ScriptError > 1
//no connect...
end if
set ErrorMode=1;
- Ralf
Message was edited by: Ralf Becher Thanks for the hint Chris!
Hi Ralf,
That's great! I'll have a play around with ErrorMode and ScriptError and I'm sure I'll come up with something. Can't say I've been aware of these in the past but I'll be sure to make a note of them and use them in the future.
Thanks a lot,
Chris
Got it working. Although looking at the help file for ScriptError it says that 1 = No Error. So I have amended the line to be:
if ScriptError > 1 then ...
This works now, thanks for your help.
Chris