Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b4

Bug #11479 Bug in nextID (sequence management)
Submitted: 2007-06-29 07:01 UTC
From: raziel057 Assigned: quipo
Status: Closed Package: MDB2_Driver_mssql (version 1.2.1)
PHP Version: 5.2.1 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  


 [2007-06-29 07:01 UTC] raziel057 (Thomas Lallement)
Description: ------------ There is a problème of sequence increment with Sql server 2005 when we call the nextID function. I resolved the problem by changing the following lines in nextID function: $query = "SET IDENTITY_INSERT $sequence_name OFF ". "INSERT INTO $sequence_name ($seqcol_name) DEFAULT VALUES"; By: $query = "SET IDENTITY_INSERT $sequence_name OFF ". "INSERT INTO $sequence_name DEFAULT VALUES"; // correction Test script: --------------- If REUNIONS_seq = 1 before the call: $new_id = $this->db->nextId('REUNIONS'); $new_id -> null (Current result) Expected result: ---------------- $new_id value: 2 Actual result: -------------- $new_id value: null

Comments

 [2007-06-30 10:06 UTC] quipo (Lorenzo Alberton)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.
 [2007-09-08 21:20 UTC] mrsocks (Max Arbos)
I am having this issue as well but with sql 2000. I see this was fixed at the end of june, but the last stable release was in May. Can you release the new version ASAP, please. I dont want to have to run with an edited version of the package. Thank you.