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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get the ODBC connection string from an external file

Is there a way to somehow generate and read the ODBC connection string from an external file?
For example:
ODBC
CONNECT TO DW (XUserId is QMQCSZFMGG, XPassword is HWOBcZFMVA);
Is the string and I want the QlikView script to read it from a file. The question is if it's possible, especially with the scrambled user and password which I'm not sure if it can be generated outside of QlikView...
1 Solution

Accepted Solutions
Not applicable
Author

This works, taking input from a file that only contains the connection string you posted

Set ConnectString = '';

test:

LOAD @1

FROM

(txt, codepage is 1252, no labels, delimiter is '\t', msq);

Let ConnectString = peek('@1',-1,test);

$(ConnectString);

View solution in original post

4 Replies
Not applicable
Author

This works, taking input from a file that only contains the connection string you posted

Set ConnectString = '';

test:

LOAD @1

FROM

(txt, codepage is 1252, no labels, delimiter is '\t', msq);

Let ConnectString = peek('@1',-1,test);

$(ConnectString);

Not applicable
Author

Thanks, Juan. I was thinking about something similar. However, the main question I have is how to generate a scrambled user name and password outside of QlikView, and yet allow QlikView to understand it. Is it possible?

Not applicable
Author

I totally missed that part of your question. Sorry, I don't know what algorithm QV uses for scrambling.

Not applicable
Author

Hi Doron,

Can you please share whether did you get answer for :

ODBC
CONNECT TO DW (XUserId is QMQCSZFMGG, XPassword is HWOBcZFMVA);
Is the string and I want the QlikView script to read it from a file.?
How is the string generated ?
What are the basic steps to get this string generated ?
Regards
Ravi