Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
how does QB handle connections to different DB sources.
I.e. when does it close a connection?
I have 2 DB sources, MYSQL and ORACLE (always the same connection parameters).
For various reasons my current code looks like this:
CONNECT MYSQL;
LOAD SOMETHING;
CONNECT ORACLE;
LOAD SOMETHING;
CONNECT MYSQL;
LOAD SOMETHING;
LOAD SOMETHING ELSE;
CONNECT ORACLE;
LOAD SOMETHING;
...
It works perfectly.
I was just wondering how many connections are opened during the script, and when are they closed?
Does QV 'remember' that the connection has been established before?
Does it make sense/ does pay off to invest the efforts to get the connections in better order, to reduce the number of connects?
Any info appreciated,
Thilo
Only one connection is open at a time. Every CONNECT will cause disconnecting from the previous database first. You can also control the specific timing by using DISCONNECT.
I doubt if QlikView "remembers" previous connections.
If you reorganize the script to reduce the number of connections, you will save some time - not sure if it's significant for you.
You can check in the log how long does it take to connect to each database every time, and then decide.
Hello Oleg,
thanks for the fast reply. And guess what: After you mentioned Disconnect, I had a look at the help file. Ooops, here it says exactly what you wrote.
Damn, I should RTFM before posting ...
Thanks a lot,
Thilo