>
> 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."
<snip/>
This usually means that your insert command is attempting to duplicate a value in a sequence, which for your table looks to be the route_id column.
-Tom