nedeľa 20. decembra 2009

How to access WinStrom database directly

WinStrom is software for book-keeping, currently supporting Czech and partially Slovak accounting rules. It is working not only on Windows, but also on Linux and Mac OS X.

It uses PostgreSQL for data storage. Sometimes you could need to access its database directly, not via WinStrom application. Here is how to accomplish this task when using WinStrom version 10.

I found access credentials in these configuration files:
/etc/winstrom/winstrom-server.xml
~/.winstrom/settings.xml

Here are settings for pgAdmin III:

Your specific maintenance DB (database name, in my case system_business__s__r__o_) you can get from this part of settings.xml:

     company-127.0.0.1:5434
system_business__s__r__o_


Other values are from winstrom-server.xml:

WinStrom server configuration
localhost
5435
dba
Password







Alternatively, you can connect using text-based console (psql):
ostry@elitebook:~$ psql -h 127.0.0.1 -p 5435 -U dba -W -d system_business__s__r__o_
Password for user dba:
psql (8.4.1)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.
system_business__s__r__o_=#

Success!

Now you are able to edit also fields, which are not writeable by WinStrom application itself, e.g. "datvyst" field of "dpolobch" table (dates of ordered items).