[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] Trouble with sql examples from Qt 3.x.
From: Hans-Peter Jansen <hpj () urpla ! net>
Date: 2004-05-27 11:20:55
Message-ID: 200405271320.55389.hpj () urpla ! net
[Download RAW message or body]
Hi Denis,
On Thursday 27 May 2004 09:46, Denis Bitouzé wrote:
>
> I created testdb database for user 'bitouze' who is a
> postgresql super-user and is allowed to create databases:
>
> [bitouze@drums SQL]$ psql -U bitouze template1 -f testdb_pg.sql
I've grabbed this sql script from trolltechs SQL examples..
> psql:testdb_pg.sql:141: ERROR: invalid input syntax for type
> money: "$123,450.50" CONTEXT: COPY staff, line 1, column salary:
> "$123,450.50" setval
Well, obviously pg doesn't like the currency format.
Two options, first you can try:
LANG=C psql -U bitouze template1 -f testdb_pg.sql
If that fails also, remove the "$" and the thousand formatter ","
from all values. You may want to remove the incompleted test database
beforehand.
> when I try:
>
> python dbconnect.py
>
> I get the following error message when cliking on 'OK':
>
> Cannot open testdb database on localhost!
>
> QMYSQL3: Unable to connect
> Unknown database 'testdb'
Please edit dbpar.py to fit your needs, or create a local_dbpar.py in
that folder from dbpar.py.
Note the DB_DRIVER parameter (you need QPSQL7 for pg).
Good luck,
Pete
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic