| From: | Setyo Nugroho <snugroho(at)gmx(dot)net> | 
|---|---|
| To: | pgsql-novice <pgsql-novice(at)postgresql(dot)org> | 
| Subject: | Can't add records | 
| Date: | 2002-11-13 18:44:50 | 
| Message-ID: | 1037213093.494.56.camel@see03 | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-novice | 
Hi all,
Wrote a small program using Qt. After some tests with another database,
usingthe very same program, I found something erroneous in my program. 
- editing & deleting records: OK
- adding records: NO
I got this eror message: 
"QPSQL:unable to create query.
Error: cannot insert a duplicate key into unique index route_pkey."
I am (almost) quite sure, this problem lies in the database. A double
check using a hand-coded program and a gui-based prog (Qt designer) has
been made, those produce same error.   
This is my database: 
cstowdb=# \d route;
            Table "route"
  Column  |     Type      | Modifiers
----------+---------------+-----------
 route_id | integer       | not null
 port1    | integer       |
 port2    | integer       |
 port3    | integer       |
 port4    | integer       |
 port5    | integer       |
 voynr    | character(10) |
Indexes: route_routeid_idx
Primary key: route_pkey
What does the above-mentioned error message mean?
How to fix the problem?
Regards,
Setyo Nugroho
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2002-11-13 18:49:44 | Re: Can't add records | 
| Previous Message | von Schwerdtner, Thomas (GXS, FPI) | 2002-11-13 18:42:50 | Re: Can't add records |