I had built an application to connect to SyBase - SQL Anywhere DB using VB.NET and appropriate ODBC connection. This was working fine until we had to make this application a service which keeps running in the background irrespective of any users logged in.
I built the application into a service and after installation I am getting the following error when connecting to SyBase (please note the connection string is exactly same as used in the application)
ERROR  [Sybase][ODBC Driver][SQL Anywhere]Database server not found
The project installer - service process installer 1 is configured as localsystem.
The creepiest thing here is, when the same application was not a service, connecting to sybase was successful. Once it was made into a service it started failing. I have a Windows 7 64-bit workstation and VS 2010.
I have been trying to do every single thing for the last one week to fix it but nothing seems to be working. Any advice would be highly appreciated.
I suspect you are trying to connect with shared memory, which will not work when the server is running as a service. Make sure the server starts TCP (use the
Update: As John said in his comment, shared memory will work if both the client and server are running as services. It's only if one of them is a service and the other is not that you need to use TCP/IP.
We often have trouble with services running as the "local service" account because that account by design does not have rights to do some things that typical users can do. We usually run into file access limitations (database cannot read/write files to a location because "local service" user does not have rights to that location).
I am not sure if this is applicable to your situation here, but it might help you narrow it down to run the application's service as a different user just to see if that changes the behavior.
answered 11 Sep '12, 09:47