On a machine with a 64-bit version of Windows, make sure your C # code is compiled to x86 (32-bit), x64, or Any Processor. Please note that if you compile “Any processor”, x64 bit drivers will be selected by default.
32-bit drivers can be found in C: \ windows \ SysWOW64 \ odbcad32.exe . 32-bit drivers can be found in C: \ windows \ system32 \ odbcad32.exe .
First, make sure that you confirm that your connection is working with the administrator of the ODBC data source using the previously specified paths. That is, make a DSN and test it, as Turbot suggested. After you check this connection, your connection string can only use the created DSN or you can use the free DSN connection string.
For a quick reference, here is an example of a free DSN connection string using the ODBC driver:
Driver = {Progress OpenEdge 11.3 Driver}; HOST = wfdscr11.wf.local; Port = 1234; DB = MyDatabaseName; UID = John; PWD = Doe
In this example, I had to connect to the Progress database from my C # code, and this is the connection string that I used without specifying a DSN. Below you can see that the driver name is "Progress OpenEdge 11.3 Driver".
source share