Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
aritting
Creator
Creator

ODBC CONNECT TO with connection string parameters?

Is it possible to create an ODBC Connection string similar to the one created for OLEDB CONNECT TO. So that the connection information is in the QlikView load script instead of in a Machine or or file DSN on a computer?

For example My OLEDB Connection statement looks like:

OLEDB CONNECT TO [Provider=MSDASQL.1;Persist Security Info=True;User ID=REDACTED;Mode=Read;Extended Properties="DRIVER={iSeries Access ODBC Driver};UID=REDACTED;SYSTEM=REDACTED;DBQ=QGPL;DFTPKGLIB=QGPL;LANGUAGEID=ENU;PKG=QGPL/DEFAULT(IBM),2,0,1,0,512;QRYSTGLMT=-1;BLOCKSIZE=32768;LAZYCLOSE=1;TRANSLATE=1;UNICODESQL=1;CONNTYPE=2;COMPRESSION=0;";Initial Catalog=REDACTED] (XPassword is REDACTED);

But if I create a ODBC CONNECT TO statement it looks like this:

ODBC CONNECT TO REDACTED;

I would like a ODBC CONNECT string that looks like :

ODBC CONNECT TO [DRIVER={iSeries Access ODBC Driver};UID=REDACTED;SYSTEM=REDACTED;DBQ=QGPL;DFTPKGLIB=QGPL;LANGUAGEID=ENU;PKG=QGPL/DEFAULT(IBM),2,0,1,0,512;QRYSTGLMT=-1;BLOCKSIZE=32768;LAZYCLOSE=1;TRANSLATE=1;UNICODESQL=1;CONNTYPE=2;COMPRESSION=0;";Initial Catalog=REDACTED] (XPassword is REDACTED);

1 Solution

Accepted Solutions
aritting
Creator
Creator
Author

I was able to come up with a work around.  Use the OLEDB connection in QlikView and then microsoft's OLEDB for ODBC .  Then use an ODBC Connection string

Here is a QlikView connect statement example to an Azure SQL Database:

OLEDB CONNECT TO [Provider=MSDASQL.1;Persist Security Info=True;User ID=YOURUSERID;Extended Properties="DRIVER=ODBC Driver 13 for SQL Server;SERVER=YOURDATABASEHOST.database.windows.net;UID=YOURUSERID;Trusted_Connection=No;APP=Microsoft® Windows® Operating System;WSID=YOURPCNAME;DATABASE=YOURDATABASE;ApplicationIntent=READONLY;";Initial Catalog=DataWarehouse] (XPassword is YOURENCRYPTEDPASSWORD);

View solution in original post

2 Replies
vinieme12
Champion III
Champion III

May be this

File DSN Connection Problem

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
aritting
Creator
Creator
Author

I was able to come up with a work around.  Use the OLEDB connection in QlikView and then microsoft's OLEDB for ODBC .  Then use an ODBC Connection string

Here is a QlikView connect statement example to an Azure SQL Database:

OLEDB CONNECT TO [Provider=MSDASQL.1;Persist Security Info=True;User ID=YOURUSERID;Extended Properties="DRIVER=ODBC Driver 13 for SQL Server;SERVER=YOURDATABASEHOST.database.windows.net;UID=YOURUSERID;Trusted_Connection=No;APP=Microsoft® Windows® Operating System;WSID=YOURPCNAME;DATABASE=YOURDATABASE;ApplicationIntent=READONLY;";Initial Catalog=DataWarehouse] (XPassword is YOURENCRYPTEDPASSWORD);