I have a C# ASP.NET Web API in VS2019, which connects to a 32-bit ODBC data source, database is SQL Anywhere 8 32-bit.
The database is upgraded to 64-bit version on SQL Anywhere 17.
But I am unable to make connection to 32-bit or 64-bit ODBC data source of 64-bit version of SQL Anywhere 17 database.
I get the error:
Parse error: DSN 'MyDataSource' does not exist
I am using OLEDB connectionstring:
"Provider=SAOLEDB;Data Source=MyDataSource;"
C# ASP.NET Web API properties are:
I tested the same connection string in test Windows Forms app and it works fine there, I am able to connect a 64-bit ODBC data source of 64-bit version of SQL Anywhere 17 database.
C# Windows Forms app properties are:
Target framework is .NET Framework 4.5 in both the cases.
Not sure if it is 'Prefer 32-bit' property which is causing the connectivity issue in C# ASP.NET Web API. I also tried to enable this property with no success.
Need help.

