Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Enter a password to connect to a database in the script

Hello everyone,

I want to extract data from an oracle database. The problem is that each time I need to reload my application, a prompt opens up and I have to manually enter this password. (which makes impossible any planifications)

Is there a way to write the password directly into the script ?

1 Solution

Accepted Solutions
Not applicable

Re: Enter a password to connect to a database in the script

I managed to do it using OLEDB

Thanks all for your help

10 Replies

Re: Enter a password to connect to a database in the script

You can connect with ODBC , in this way you write the password in the connection only once and then use the connection name into your document

Not applicable

Re: Enter a password to connect to a database in the script

Thank you for your answer Alessandro.

I already use an ODBC but it was configured in a way that I still need to enter the password each time. And I tried to change that but I didn't find how to do it.

That's why I was wondering if there was a way to enter it in the script.

Re: Enter a password to connect to a database in the script

Then use the conection string:

ODBC CONNECT TO [dbsomething;DBQ=DB00_APP.WORLD] (XUserId is Z1YSHSIRJJaSMVEVIXacA, XPassword is LcFPKXNGXDMcW33ZI2W);


obviously with your data

Not applicable

Re: Enter a password to connect to a database in the script

Thank you

ODBC CONNECT TO [NameOfTheODBC;DBQ=NameoftheODBC](XUserId is MyUserID, XPassword is MyPassword);

But I still get the prompt..

Not applicable

Re: Enter a password to connect to a database in the script

Check in the ODBC driver that the correct password is entered in there. As well as the one when you connect using the script.

When both passwords match it should work.


Regards,
Marius

p_verkooijen
Valued Contributor

Re: Enter a password to connect to a database in the script

Don't use ODBC CONNECT but CONNECT like

CONNECT TO Driver={Microsoft ODBC Driver for Oracle};ConnectString=OracleServer.world;
Uid
=myUsername;Pwd=myPassword;


This way you don't use a odbc dns but just the driver


Not applicable

Re: Enter a password to connect to a database in the script

thanks Marius,

The thing is I can't see where in the odbc the password is entered ... (I'm not very comfortable with odbc )

Sans titre.png

I can see the User ID but I can't find the password... :/  For example, when I click on "Test connection", a prompt opens up to ask me for the password.

thank you for your help

Not applicable

Re: Enter a password to connect to a database in the script

Hi Laura,

Connect To Oracle Via ODBC Driver [Enterprise Architect User Guide]

In this link you will find a how to set up / manage an ODBC driver.

Regards,
Marius

Not applicable

Re: Enter a password to connect to a database in the script

Hi Laura,


Here is a how to create / manage an ODBC Connection.


sparxsystems.com/enterprise_architect_user_guide/8.0/projects_and_teams/connect_to_oracle_via_odbc.html


Regards,

Marius

Community Browser