If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Duplicate serial in Informix 7.2.3

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-25-07, 14:22
pitris pitris is offline
Registered User
 
Join Date: Nov 2005
Posts: 5
Duplicate serial in Informix 7.2.3

Hi,

I've developed an webservice application which accesses an informix database.
When the service is invoked, the application executes some business logic, opens a transaction inserts values in 3 tables (let's call them A, B and C), and commits it. Table A's primary key column is of type serial and my application sets no value to it, so the number is automatically generated. This is also a foreign key to table B.

My problem is that sometimes a duplicate serial is generated, when two consecutive transactions insert values in table A. I assume that this happens when the second transaction makes the insert before the first one is commited, but I'm not really sure about this. I've tried several isolation levels (repeatable read, read commited and serializable) and observed the same behaviour. We are using Informix 7.2.3 running under solaris 2.6.

Anyone can help me?

Thanks in advance.
Pedro
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On