problem with add - Mailing list pgsql-odbc

From lists
Subject problem with add
Date
Msg-id 01a601c2f85e$08c15f20$84faabc8@insyde
Whole thread Raw
Responses Re: problem after upgrade ---
Re: problem with add
List pgsql-odbc
(this is a long post, sorry, but I have to explain the history)
 
Hi,
 
I've posted this some time ago, but I received an answer
that do not satisfy me, and possibly others.
 
What I'm trying to do is:
 
I have a taable, say TBL1 built like this:
 
CREATE TABLE TBL1 ( A INT,
                                    B CHAR(4),
                                    C CHAR(3) );
ALTER TABLE TBL1 ADD PRIMARY KEY ( A, B);
 
Then I add some values to it, via ODBC
 
INSERT INTO TBL1 (A,B,C) VALUES (1,'aaaa', 'bbb');
INSERT INTO TBL1 (A,B,C) VALUES (2,'aaaa', 'bbb');
INSERT INTO TBL1 (A,B,C) VALUES (3,'aaaa', 'bbb');
INSERT INTO TBL1 (A,B,C) VALUES (4,'aaaa', 'bbb');
INSERT INTO TBL1 (A,B,C) VALUES (5,'aaaa', 'bbb');
 
It's ok so far.
 
But a new user of the system tries to insert a value that
already exists:
 
INSERT INTO TBL1 (A,B,C) VALUES (4,'aaaa', 'ccc');
 
then the program crashes!
 
You can say that I didn't treated the error, but I did treat the error,
but the error code I was expecting (23000 - duplicated primary key)
didn't came back. Instead an error message from the SGBD came.
 
Is there any chance this would be corrected? Anyone else had the same
problem/experience? Any work-around?
 
If I know more programming, I would correct this, but I can't program.
 
TIA,
Ricardo.

pgsql-odbc by date:

Previous
From: "Epperson, Wade"
Date:
Subject: FW: errors syncing postgresql with pocketpc database
Next
From: Markus Wagner
Date:
Subject: row-level locking