
August 8th, 2007, 08:53 AM
|
|
Registered User
|
|
Join Date: Aug 2007
Posts: 2
Time spent in forums: 20 m 37 sec
Reputation Power: 0
|
|
|
MDB2 nextId will increase even with duplicate data
Hello,
I have a table ('table') with three columns: id (primary) , a_id, b_id.
The pair (a_id,b_id) is set as UNIQUE in the database.
I am using MDB2 (similar to DB) and I am making use of nextId. So I have table_seq as the table with the latest id.
When I want to enter new information (by the end of the call) I make table_seq increase its id. This is all good but this happens even if the pair being inserted in table is a duplicate and so wont be inserted.... yet still the table_seq is increased.
Any suggestions for improvement ?
Any comments or suggestions are more than welcome.
Thanks
|