Can't add records

Поиск
Список
Период
Сортировка
От Setyo Nugroho
Тема Can't add records
Дата
Msg-id 1037213093.494.56.camel@see03
обсуждение исходный текст
Ответы Re: Can't add records
Re: Can't add records
Список 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



В списке pgsql-novice по дате отправления:

Предыдущее
От: Lachlan Deck
Дата:
Сообщение: Help with JDBC connection...
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Can't add records