problem with add

Поиск
Список
Период
Сортировка
От lists
Тема problem with add
Дата
Msg-id 01a601c2f85e$08c15f20$84faabc8@insyde
обсуждение исходный текст
Ответы Re: problem after upgrade ---  (Jeff Silberberg <jsilberberg@mindspring.com>)
Re: problem with add  (Chris Gamache <cgg007@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: "Epperson, Wade"
Дата:
Сообщение: FW: errors syncing postgresql with pocketpc database
Следующее
От: Markus Wagner
Дата:
Сообщение: row-level locking