Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Alternate between CONNECT32 and CONNECT64

Hi,

In my environment we are 32 bits on Desktop and 64 bits no Server. Because of that, we need to change the connection strings from something like:

OLEDB CONNECT32 TO [Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=myuser;Data Source=animus;Extended Properties=""] (XPassword is XXXXXXX);

to

OLEDB CONNECT64 TO [Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=myuser;Data Source=animus;Extended Properties=""] (XPassword is XXXXXXX);


every time we need to deploy the application in qlikview server, and do the opposite when we need to do some maintenance on it in the desktop.


I'm wondering if there is any feature (eg, a conditional) in qlikview scripting than I can use here to avoid changing the connection string by hand. If so, how can I do that?


Thanks in advance,

Matheus

4 Replies
Miguel_Angel_Baeyens

‌Hi Matheus,

Use a varible in the script with the full sente ce or keyword and include it in the script:

$(Include=arch.txt);

OLEDB '$(vArch)' TO [...];

where arch.txt is a file with a single line:

SET vArch = 'CONNECT32';

and likewise in the server with the 64 bit command.

Miguel

MarcoWedel

‌connect instead of connect32/64

Not applicable
Author

That would be great, but I'm getting an "unregistered class" error when I use CONNECT instead of CONNECT32 on desktop:

ErrorSource: Microsoft OLE DB Service Components, ErrorMsg: Classe não registrada

OLEDB CONNECT TO [Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=XXXX;Data Source=XXXX;Extended Properties=""] (XPassword is XXXXX)

Not applicable
Author

Thanks, Miguel! I just had to take off the quotes, the following worked like a charm:


$(Include=arch.txt)

OLEDB $(vArch) TO [...];