<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Inefficient NextID Allocation</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Inefficient NextID Allocation</description>
  <pubDate>Mon, 13 Apr 2026 09:03:47 -700</pubDate>
  <lastBuildDate>Mon, 27 Aug 2007 18:01:16 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=384</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Inefficient NextID Allocation : Thanks - I knew this must have...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=384&amp;PID=989#989</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=106" rel="nofollow">MichaelP</a><br /><strong>Subject:</strong> 384<br /><strong>Posted:</strong> 27-Aug-2007 at 6:01pm<br /><br />Thanks - I knew this must have been addressed already as it seemed like a major potential problem that is very easily avoided. <DIV>&nbsp;</DIV><DIV>I would hate to think what kind of mess a database would be in if you didn't discover this issue until after the Id number range had been used up over multiple tables.</DIV>]]>
   </description>
   <pubDate>Mon, 27 Aug 2007 18:01:16 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=384&amp;PID=989#989</guid>
  </item> 
  <item>
   <title>Inefficient NextID Allocation : There is another implementation...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=384&amp;PID=982#982</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 384<br /><strong>Posted:</strong> 27-Aug-2007 at 7:51am<br /><br />There is another implementation that we have made available to developers that addresses your objection.&nbsp; It's called the <strong>PooledNumericIdGenerator</strong>, and it can be found in <strong>Program Files\IdeaBlade DevForce\Sample Code\CSharp(or VB).</strong><DIV>&nbsp;</DIV><DIV>The <strong>PooledNumericIdGenerator</strong> allows you to have an entry in the <strong>NextId </strong>table for each table that you want to have its own pool of unique ids.&nbsp; For more details read the comments in the source code.</DIV>]]>
   </description>
   <pubDate>Mon, 27 Aug 2007 07:51:55 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=384&amp;PID=982#982</guid>
  </item> 
  <item>
   <title>Inefficient NextID Allocation : MichaelP, you can use PooledNumericIdGenerator...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=384&amp;PID=981#981</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=47" rel="nofollow">vkh75</a><br /><strong>Subject:</strong> 384<br /><strong>Posted:</strong> 27-Aug-2007 at 2:14am<br /><br /><strong>MichaelP</strong>, you can use <strong>PooledNumericIdGenerator</strong> class that comes with DevForce. <span style="font-size:10px"><br /><br />Edited by vkh75 - 27-Aug-2007 at 2:17am</span>]]>
   </description>
   <pubDate>Mon, 27 Aug 2007 02:14:13 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=384&amp;PID=981#981</guid>
  </item> 
  <item>
   <title>Inefficient NextID Allocation : You have pointed out a very good...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=384&amp;PID=980#980</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=123" rel="nofollow">owais,zahid</a><br /><strong>Subject:</strong> 384<br /><strong>Posted:</strong> 27-Aug-2007 at 1:49am<br /><br /><P>You have pointed out a very good issue, this will definitly create problems. Well, the solution is simple. </P><DIV></DIV>1) Add the Table Name entry in NextId table and fill the NextId column with 1 (or any other value you want). <DIV>&nbsp;</DIV><DIV>2) Now, modify the NumericIdGenerator class "AllocateMoreIds" function by changing the sqlselect string to add the name of your table. </DIV><DIV>&nbsp;</DIV><DIV>I think this will work. I havn't tested it.</DIV>]]>
   </description>
   <pubDate>Mon, 27 Aug 2007 01:49:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=384&amp;PID=980#980</guid>
  </item> 
  <item>
   <title>Inefficient NextID Allocation : The NumericIdGenerator class (version...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=384&amp;PID=979#979</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=106" rel="nofollow">MichaelP</a><br /><strong>Subject:</strong> 384<br /><strong>Posted:</strong> 26-Aug-2007 at 10:11pm<br /><br />The NumericIdGenerator class (version from&nbsp;Cabana) just uses the SQL statement:<DIV>&nbsp;&nbsp; Select NextId from NextId where Name='GLOBAL'</DIV><DIV>&nbsp;</DIV><DIV>This seems like Ids are allocated globally rather than being specific for each table. This means every Id is unique and won't be used as an Id in any other table. Does this seem inefficient to anyone? This limits the total number of records of all tables to the number limit of that field.</DIV><DIV>&nbsp;</DIV><DIV>I planned to use SQL Server SmallInt for some Id fields to save space, but this would then severely limit my database total number of database records in all tables to only a maximum of 32767 rows, i.e. if one table had 32700 records in it, then all the other tables could only have a combined total of 67 rows.</DIV><DIV>&nbsp;</DIV><DIV>Does anyone have a smarter version of this class that allows Ids to be allocated by tablename to get around this?</DIV>]]>
   </description>
   <pubDate>Sun, 26 Aug 2007 22:11:29 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=384&amp;PID=979#979</guid>
  </item> 
 </channel>
</rss>