Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, how could i choice to use "connect" or "connect32" depending one variable that have the Qlikview version?
I have the variable vVersion with this formula:
=IF(MID(QlikViewVersion(),1,INDEX(QlikViewVersion(),'.')-1)<=9,'CONNECT','CONNECT32')
Then there are errors using the next load script:
IF $(vVersion) = "CONNECT32" THEN
ODBC CONNECT32 TO DATABASE;
ELSE
ODBC CONNECT TO DATABASE;
ENDIF
LOAD *;
SQL SELECT *
FROM DATA;
Does any know hou to do it?
Thanks in advance, and Happy New Year!
Your construction with an IF control statement should work - but you must use single quotes:
IF $(vVersion) = 'CONNECT32' THEN
ODBC CONNECT32 TO DATABASE;
ELSE
ODBC CONNECT TO DATABASE;
ENDIF
But even better would be to use the variable directly:
ODBC $(vVersion) TO DATABASE;
HIC
Hello,
Happy new year to you.
Can you see if your ODBC connection is present in both programs :
%systemdrive%\Windows\SysWoW64
%systemdrive%\Windows\System32
The first manage the 32 bits ODBC connections and the second the 64.
You must create DATABASE in both of them.
Amand Dupretz
Your construction with an IF control statement should work - but you must use single quotes:
IF $(vVersion) = 'CONNECT32' THEN
ODBC CONNECT32 TO DATABASE;
ELSE
ODBC CONNECT TO DATABASE;
ENDIF
But even better would be to use the variable directly:
ODBC $(vVersion) TO DATABASE;
HIC
Thanks! Finally using single quotes and removing '=' from formula was enough
Other mode without using variables could be:
IF IF(MID(QlikViewVersion(),1,INDEX(QlikViewVersion(),'.')-1)<=9,'CONNECT','CONNECT32') = 'CONNECT32' THEN
ODBC CONNECT32 TO DATABASE;
ELSE
ODBC CONNECT TO DATABASE;
ENDIF
Regards