Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ODBC Connection failed

Hi

When I load my script I get an error: "ODBC Connection failed". When I connect,I do a test connection and it shows there is a connection but when I load my script it fails. Am I doing something wrong on Qlikview or did something change on the ODBC side maybe like my password or something?

Thanx

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

Depending on the ODBC version and database you need to specify the schema or the owner in the SQL sentence:

// This will work with MS SQL Server

SQL SELECT *

FROM Database.owner.Table;

But first of all, check with the IT people that the user you are specifying is able to run those queries.

Hope that helps.

Miguel

View solution in original post

4 Replies
Miguel_Angel_Baeyens

Hi,

If there is user and password in your connection, you better set it in the ODBC dialog when you click on the "Connect..." button in the Edit Script window if you don't want to be prompted for user and password each time you reload.

The test connection only test that the computer that runs QlikView is able to get to the DBM, but there might be some issues in the script or SQL sentence that the ODBC does not understand and then crashes.

Hope that helps.

Miguel

Not applicable
Author

Hi Miguel

Thanx for your reply. I type in my username and password when clicking on connect. This username and password worked previously but now it is not working. But previously when I used my username and password it generates a username and password in the conncet script. Below is the script.

1.JPG

Is this issue on Qlikview or did our administrators change something

Miguel_Angel_Baeyens

Hi,

Depending on the ODBC version and database you need to specify the schema or the owner in the SQL sentence:

// This will work with MS SQL Server

SQL SELECT *

FROM Database.owner.Table;

But first of all, check with the IT people that the user you are specifying is able to run those queries.

Hope that helps.

Miguel

Not applicable
Author

Hi Miguel

Thanx for your reply. The database we are using is a universe database that has an ODBC mirror of all the tables for reporting purposes. I have previous models that conncets to the same db and those ones are working with the same script. I think our IT guys has changed rights to the username and password that connects to the db.

Thanx for your reply.

Hein