Posted 12 April 2019, 11:09 am EST
I have a report that is connecting to a postgresql 11 database in Azure and it works fine in my Visual Studio 2017 environment. When I publish the website to my localhost or to my web server I get an error viewing the report related to the ODBC driver.
My DataSource is defined as: Microsoft ODBC Provider
My Connection string looks like this:
Driver={PostgreSQL UNICODE};Server=XXXXXX.eastus.cloudapp.azure.com; Port=5432; Database=MyDatabase;Uid=XXXXXX; Pwd=XXXXXX;
I have install the Postgresql ODBC drivers and they are located in
C:\Program Files\psqlODBC\1100\bin
I have added this path to the environmental vars also.
I create both a 32bit and a 64bit ODBC System DSN and both test successfully.
This is the error I get viewing the report:
An error(s) occurred
An unexpected error occurred. Additional information: ‘ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified’
So it seems the report can’t see where the C:\Program Files\psqlODBC\1100\bin\psqlodbc30a.dll is located?
Any ideas?
Thanks