Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
May 14, 2021 10:25:09 AM
Apr 10, 2015 7:32:55 PM
When having any issue fetching data from Data Source to QlikView or QlikSense using a given Connection String, it is crucial to determine whether it is QlikView or QlikSense failing to fetch data, or the Connection String is incorrect or Data Source is rejecting the request.
The best way is to establish connection and fetch data from a 3rd party tool. Chances are:
Notes:
The complete script in Test_Connection_String.ps1 is below:
##############################################################################
##
## Test_Connection_String.ps1
##
## This script tries to establish a DB connection as instructed by a given
## Connection String, then execute the given SQL query and save the result to
## out.csv file
##
##############################################################################
## Please provide Connection String
$ConnectionString = "Connection String to be tested"
## Please provide SQL Query
$SQLquery = "SQL query to be tested"
##############################################################################
$conn = New-Object System.Data.OleDb.OleDbConnection
$conn.ConnectionString = $ConnectionString
$comm = New-Object System.Data.OleDb.OleDbCommand($SQLquery,$conn)
$conn.Open()
$adapter = New-Object System.Data.OleDb.OleDbDataAdapter $comm
$dataset = New-Object System.Data.DataSet
$adapter.Fill($dataSet)
$conn.Close()
$table = $dataset.Tables[0]
$table | Export-CSV "out.csv"
First of all, one needs to enable Script Execution on the PC. In order to do so, follow these steps:
Steps to test Connection String: