From: DeskNow Knowledge Base
http://www.desknow.com/kb/

Could not connect to the database
http://www.desknow.com/kb/idx/6/183/article/

This error typically occurs on startup, and it means that DeskNow cannot connect to the database.

If you're using the embedded database on Windows

Check that the 'DeskNowDB' service is running. If the service is not running, check for error messages in the Windows Event Viewer (under Control Panel/Administrative Tools/Event viewer). Look for messages in the 'Application' section, the message should be logged under PostgreSQL. The messages will explain why the database could not start.

The 99.9% of the times the error occurs if the database cannot access its files. The database files are in \desknowdata\pgdata, and the database runs with the 'desknowpostgres' Windows user account. That account must have read access to the desknowdata folder (and any parent folder) and full control to the \desknowdata\pgdata folder (and any subfolder).

These permissions are set automatically by DeskNow's installer, but you have removed them by mistake. You can restore them manually, or re-run the DeksNow installer (stop DeskNow first, but do not uninstall it) to recreate them.

If you're using an external database

Check that the hostname and port are correctly set in Database.cfg, and correspond to the address of your database. Check that the database is listening at that address, on that port, and that there is no firewall blocking communications between DeskNow and the database.