Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm QlikView begginer. I can reload QVW with many different databases. I can set the database by command line parameter:
"c:\Program Files\QlikView\qv.exe" /r /vDB=DB1 j:\QLIKVIEW\DEVELOPMENT\TEST.qvw
In case the parameter is'nt set (by reload from Desktop), I can use the deafult database.
I have this line before connect to database:
IF (Len(Trim(DB))=0 or IsNull(DB)) THEN
SET SetDB = 'DB0';
ELSE
SET SetDB = $(DB);
ENDIF;
Then I connect to SetDB database.
But... SetDB is already set as DB0, so script don't take the value from parameter DB. Do you see some mistake? Can you help me?
Many thanks,
Olda
Hello,
I found many possibilities how to set the parameter. Finally I has a correct script:
LET SetDB=NULL(); // delete old value
IF (Len(Trim(DB))=0 or IsNull(DB)) THEN
LET SetDB = 'DB0';
ELSE
LET SetDB = $(DB);
ENDIF;
LET DB=NULL(); //delete old value
VERY IMPORTANT! I have to add new parameter DB into Settings - Variable Overview! My parameter did'nt exist before.
Hi,
Its because previously assigned values is stored in that variable
set variable for the DB after
IF (Len(Trim(DB))=0 or IsNull(DB)) THEN
SET SetDB = 'DB0';
ELSE
SET SetDB = $(DB);
ENDIF;
SET DB=;//or LET DB = Null();
Thanks,
I tried it. I have the same results: already DB0. I think, I have the opposite problem, I have in condition the empty DB - parameter from command line not set it.
Do you have any idea?
O.
Hello,
I found many possibilities how to set the parameter. Finally I has a correct script:
LET SetDB=NULL(); // delete old value
IF (Len(Trim(DB))=0 or IsNull(DB)) THEN
LET SetDB = 'DB0';
ELSE
LET SetDB = $(DB);
ENDIF;
LET DB=NULL(); //delete old value
VERY IMPORTANT! I have to add new parameter DB into Settings - Variable Overview! My parameter did'nt exist before.