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