Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
thomas_wang
Contributor

How can I decode a pair of XUserID and XPassword in ODBC Connector?

Hi All,

I have read the topic "How to generate xuser & xpassword in txt file".

but the VBScript provided from the answer cannot be run and report syntax errors in my QlikView,

Any other ideas?

Thanks!

1 Solution

Accepted Solutions
Partner
Partner

Re: How can I decode a pair of XUserID and XPassword in ODBC Connector?

I have a much easier solution to decrypt the XPASSWORD.

OLEDB CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sql_user;Initial Catalog=DBSQL;Data Source=13.37.13.37;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=QLIKVIEW;Use Encryption for Data=False;Tag with column collation when possible=False] (XPassword is XXXXXXXXXXXXXXXXXXXXXXX);

LET vPassword = REPLACE(CONNECTSTRING(), ';', '.');

TRACE $(vPassword);

4 Replies
thomas_wang
Contributor

Re: How can I decode a pair of XUserID and XPassword in ODBC Connector?

In the VBScript, I deleted the underline and merged the context into the same line. No syntax errors were reported again, but the result of conversion was garbled.

thomas_wang
Contributor

Re: How can I decode a pair of XUserID and XPassword in ODBC Connector?

Here I found my own way:

1. Rename the connection string that you have defined before.

2. Reload.

3. Then you will receive an error "SQL##f - SqlState: 28000, ErrorCode: 18456, ErrorMsg: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'XXX'." Note that the last XXX is the original username.

4. Modify the connection parameters again to copy the XPassword to the XUserID.

5. Reload again.

6. Then you will receive an similar error. Note that this time the last XXX is the original password.

Partner
Partner

Re: How can I decode a pair of XUserID and XPassword in ODBC Connector?

I have a much easier solution to decrypt the XPASSWORD.

OLEDB CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sql_user;Initial Catalog=DBSQL;Data Source=13.37.13.37;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=QLIKVIEW;Use Encryption for Data=False;Tag with column collation when possible=False] (XPassword is XXXXXXXXXXXXXXXXXXXXXXX);

LET vPassword = REPLACE(CONNECTSTRING(), ';', '.');

TRACE $(vPassword);

thomas_wang
Contributor

Re: How can I decode a pair of XUserID and XPassword in ODBC Connector?

If the connection string works, the CONNECTSTRING() function returns detailed connection information including the plaintext username and password.

Replace(ConnectString(), ';', '\n')