When the PowerServer application uses ODBC to connect to the SQL Anywhere database and PowerServer Web API is published to IIS, if the database is on the same machine as the Web API, the PowerServer application may fail to connect to the database and SQLCA.SQLErrorText will return “Database Server not found.”
SQL Anywhere 12/16/17 or later
PowerServer 2021 or later
Using dbsrv##.exe to start the SQL Anywhere database will cause the .NET application to not be able to connect to the database by ODBC.
For example, dbsrv16.exe “C:\Users\Public\Documents\SQL Anywhere 16\Samples\demo.db”.
You can use any of the solutions below to work around this issue:
Solution #1 – Start the SQL Anywhere database in a different way (recommended)
Instead of using dbsrv##.exe, create a service in Sybase Central to start the SQL Anywhere database, as shown in the screenshot below:
Solution #2 – Modify ODBC
On the login tab of the ODBC Configuration window, change Action from “Connect to a running database on this computer” to “Connect to a running database on another computer.”
Before the change:
After the change: