Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ODBC Connexion Parameter's

Hi community,

I have a simple problem.

I have done an ODBC Connection in my Qlikview application to connect it to a ORACLE database.

But in my string connection, the USERID and PASSWORD are encrypted.

I wish they were written in clear.

Thanks for ur help..


1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Yimen,

Change this SET instruction for this LET instruction

LET STR_Connection = '[$(vDSName);DBQ=$(vDBName)] (UserId is $(vUserID), Password is $(vUserPWD))';


Regards.

EDITed: cleanup of quotes and ampersands for LET.

View solution in original post

7 Replies
Miguel_Angel_Baeyens

Hello,

Got to the Settings menu, User Preferences, General, check "Scramble Connect User Credentials".

Since you have applied, closed QlikView and opened it again, any ODBC connection user and passwords will be clear plain text. You will see them as UserId and Password, instead of the current XUserID and XPassword.

Hope that helps.

Not applicable
Author

Please, Now i would like to load the parameters of connexion from an Excel file.

I do this:

Parametres_ODBC:
LOAD DSName,
DBName,
[UserID],
UserPWD
FROM
..\EXCEL_Files\Parametres_Connexion_ODBC.xls
(biff, embedded labels, table is ODBC$);

SET STR_Connection = '[' & DSName & ';DBQ=' & DBName & ' ] (UserId is ' & [UserID] & ', Password is ' & UserPWD & ')';

ODBC CONNECT TO $(STR_Connection) ;

But an error appears:

Scories après instruction
ODBC CONNECT TO '[' & DSName & ';DBQ=' & DBName & ' ] (UserId is ' & [UserID] & ', Password is ' & UserPWD & ')'

I don't know the problem.

Please help me.

Miguel_Angel_Baeyens

Hi,

The problem is that fields may have several results and cannot be used directly in a variable. Try instead

Parametres_ODBC:LOAD DSName, DBName, [UserID], UserPWDFROM..\EXCEL_Files\Parametres_Connexion_ODBC.xls(biff, embedded labels, table is ODBC$); LET vDSName = Peek('DSName', -1, 'Parametres_ODBC'); // Get the latest result (or the only one)LET vDBName = Peek('DBName', -1, 'Parametres_ODBC'); LET vUserID = Peek('UserID', -1, 'Parametres_ODBC'); LET vUserPWD = Peek('UserPWD', -1, 'Parametres_ODBC'); SET STR_Connection = '[' & $(vDSName) & ';DBQ=' & $(vDBName) & ' ] (UserId is ' & $(vUserID) & ', Password is ' & $(vUserPWD) & ')';


Please note that the example is not tested and some commas or parentheses may be missing.

Hope that helps.

Not applicable
Author

The following error appears:

Scories après instruction
ODBC CONNECT TO '[' & BGFI DATA SRCE 01 & ';DBQ=' & BDDELTA & ' ] (UserId is ' & delta & ', Password is ' & delta & ')'

I don't know why !!!!

Miguel_Angel_Baeyens

Yimen,

Change this SET instruction for this LET instruction

LET STR_Connection = '[$(vDSName);DBQ=$(vDBName)] (UserId is $(vUserID), Password is $(vUserPWD))';


Regards.

EDITed: cleanup of quotes and ampersands for LET.

Not applicable
Author

When i change SET to LET, the following error appears:

Erreur de ligne de script :
LET STR_Connection = '[' & BGFI DATA SRCE 01 & ';DBQ=' & BDDELTA & ' ] (UserId is ' & delta & ', Password is ' & delta & ')'

The problem does not arise because of SET or LET.

I checked the contents of the variable STR_Connection and I see the connection string is built correctly.

The error is in the ODBC connect statement.

In fact, I think.

Not applicable
Author

Please SIR MIGUEL, Excuse me

I had not looked the structure of statement with LET. It's OK.

Thanks a lot for ur help