No data source name found and no default driver specified (using Amazon Redshift (x64))

private OdbcConnection _internalConnection; public OdbcConnection InternalConnection { get { if (_internalConnection == null) { Open(); } return _internalConnection; } } public void Open() { _internalConnection = new OdbcConnection(CreateConnectionString()); try { if (_internalConnection.State == System.Data.ConnectionState.Closed) _internalConnection.Open(); } catch { throw; } } private string CreateConnectionString() { int endpointPort = 5439; string driver = "{Amazon Redshift (x64)}"; string connectionString = "Driver={0};Server={1};Database={2};UID={3};PWD={4};Port={5};SSL=true;Sslmode=Require"; connectionString = string.Format(connectionString, driver, Parameters[ConnectionParameterType.DataSource], Parameters[ConnectionParameterType.DatabaseName], Parameters[ConnectionParameterType.UserName], Parameters[ConnectionParameterType.Password], endpointPort); return connectionString; } 

see an error in the image

+5
source share
1 answer

install 32-bit driver

https://s3.amazonaws.com/redshift-downloads/drivers/AmazonRedshiftODBC32-1.3.1.1000.msi

and replace the line driver

string driver = "{Amazon Redshift (x86)}";

+5
source

Source: https://habr.com/ru/post/1260985/


All Articles