Reputation: 3236
Is there a way to acess x64 ODBC DSN via x86 Powershell/Powershell ISE window?
Right now if I try so I get an error that DSN/driver is not found, and it's true because there is no such driver/dsn in x86 ODBC store.
The only way to achive this is to open x64 powershell console from SysWOW64\WindowsPowerShell\v1.0
Could I explicitly set driver location from x64 store? My connection string right now looks like this:
$Connection = New-Object System.Data.Odbc.OdbcConnection
$Connection.ConnectionString = "driver={Adaptive Server Enterprise};dsn=$DSN;db=$DefaultDatabase;na=$ServerName,$Port;uid=$uid;pwd=$pwd;"
Upvotes: 0
Views: 1082
Reputation: 9444
32-bit x86 processes, including x86 Powershell, cannot directly use 64-bit x86_64 libraries including ODBC DSNs/drivers.
64-bit x86_64 processes, including x86_64 Powershell, cannot directly use 32-bit x86 libraries including ODBC DSNs/drivers.
You can use a "Multi-Tier" bridging solution, which uses TCP/IP or other networking communications layer to communicate between 32-bit and 64-bit environments, such as this one from my employer, OpenLink Software ... or you can acquire a 32-bit ODBC driver for Sybase ASE.
Upvotes: 0