Zobrazujú sa príspevky s označením Mac OS X. Zobraziť všetky príspevky
Zobrazujú sa príspevky s označením Mac OS X. Zobraziť všetky príspevky

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).

nedeľa 6. septembra 2009

How to install PostgreSQL module for Python

How to install psycopg2?

On Ubuntu Linux (9.04):
sudo apt-get install python-psycopg2

On Mac OS X (Leopard) - valid for PostgreSQL 8.4:
export PATH="/Library/PostgreSQL/8.4/bin:$PATH"
sudo easy_install -U setuptools
sudo easy_install psycopg2

In case of problems, install PostgreSQL first. Don't know how? Don't worry, it is pretty straightforward. For example on Linux, but also on Mac OS X or Windows.