Steven Van Ingelgem wrote:
I have a database (duh :p)... There are a few things inside... Now I add a row:

10:33:59: Transition: 'BEGIN ON CONFLICT FAIL;
INSERT INTO Address (CustomerID, Name1, Name2, Name3, Address, ZIP, City, CountryCode, Phone, Fax, Remark) VALUES ('1', '1', '', '', '1', '1000', '1', 'B ', '', '', '');commit;
'


--> .... columns are duplicate (that's normal because the data is already in there & the index are set on each field).

Then I redo the exact same insert:

10:34:00: Transition: 'BEGIN ON CONFLICT FAIL;
INSERT INTO Address (CustomerID, Name1, Name2, Name3, Address, ZIP, City, CountryCode, Phone, Fax, Remark) VALUES ('1', '1', '', '', '1', '1000', '1', 'B ', '', '', '');commit;
'


--> "Cannot start a transaction within a transaction"

Ok, I do understand that you can't start a transaction in another transaction, but as far as I know I did open & close it only once for each query, right?
My best guess is that somewhere the transaction isn't closed (internally)...



When the first INSERT failed, execution of the SQL stopped. So the first COMMIT never occurred. So the first transaction was still active when you tried to start the second one.


-- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to