Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 4 of 4 total |
SQL Update queries do not update LastAutoInc |
Wed, May 30 2007 1:54 PM | Permanent Link |
Michael Shannon | Hello,
In DBISAM 4.2x, executing an SQL statement similar to the following does not update the LastAutoInc value for the table: UPDATE TableName SET ID = (ID + 1000) ID is primary key of AutoInc type. "Regular" non-SQL editing of the ID value WOULD auto-set LastAutoInc appropriately (as mentioned here: http://www.elevatesoft.com/scripts/newsgrp.dll? action=openmsg&group=5&msg=47994&page=1#msg47994), so shouldn't the query do the same for consistency? Thank you, Michael Shannon |
Thu, May 31 2007 3:20 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< In DBISAM 4.2x, executing an SQL statement similar to the following does not update the LastAutoInc value for the table: UPDATE TableName SET ID = (ID + 1000) ID is primary key of AutoInc type. "Regular" non-SQL editing of the ID value WOULD auto-set LastAutoInc appropriately >> You are assigning the autoinc column a value manually. In such a case, DBISAM will not increment the auto-increment value for the column. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Jun 1 2007 8:58 AM | Permanent Link |
Michael Shannon | Okay Tim, thanks for the info. I can't say that I see this behavior as logical (since the similarly manual assignment, e.g., via GUI, *does* auto-increment
LastAutoInc - as I mentioned in my original post), but no problem, just something one needs to be aware of. Thanks, Michael Shannon |
Fri, Jun 1 2007 3:42 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michal,
<< Okay Tim, thanks for the info. I can't say that I see this behavior as logical (since the similarly manual assignment, e.g., via GUI, *does* auto-increment LastAutoInc - as I mentioned in my original post), but no problem, just something one needs to be aware of. >> I mis-understood what you were saying because I didn't read the link and I thought that I understood the question to entail the auto-inc values in the columns, not the last auto-inc value for the table. That post from 2005 is no longer accurate, and I'm not sure if it was ever accurate. The latest 4.x versions only increment the last auto-increment value when inserting rows. They do not touch the last auto-increment value when modifying rows. That's the way it always should have been. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Sunday, May 5, 2024 at 10:18 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |