Search code examples
vbscriptamazon-redshifthp-uft

UFT connection with Redshift


We are getting error while trying to connect UFT with Redshift:

Dim  dbConnection
Srvname = "Driver={Amazon Redshift (x64)};Server=serverName; Database=DBName; UID=****; PWD=****; Port=****;"
Set dbConnection = CreateObject("ADODB.Connection") 
dbConnection.Open Srvname

Error coming as:

Datasource name not found and no default driver specified.

But with all same credential we can able to connect redshift with "SQL Workbench".


Solution

  • SQL Workbench is using a different Connector (most probably JDBC or some other technology). The ADODB.Connection Object is trying uses the ODBC Drivers installed for the Operating System, so first things frist you need to install the ODBC Driver.

    After this is don, depending on your credential management policy, you may need to simply use the proper Connection String or configure stuff in the ODBC wizard of Microsoft Windows.