Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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);
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.
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.
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);
If the connection string works, the CONNECTSTRING() function returns detailed connection information including the plaintext username and password.
Replace(ConnectString(), ';', '\n')
Great solution, I didn't know that function.
Many thanks!
Riccardo
It works thank you
Regards
Malli
is this not working anymore in QV 12.50 ?