Howard,

  Thanks.  I like the idea of doing it with a trigger.  

 

Paul 

 

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Howard Fore
Sent: Wednesday, March 12, 2008 11:02 AM
To: [email protected]
Subject: Re: [ACFUG Discuss] Database incremental Counter

 

Barring some other requirement that dictates otherwise, you'd be better off
to keep the incrementing function on the database. Use an insert trigger on
the table to update the row or make the field autoincrementing.

Howard

On Wed, Mar 12, 2008 at 12:45 PM, Paul Morton <[EMAIL PROTECTED]> wrote:

I'm just looking for ideas when creating a counter in a SQL server database.

I have a need for a counter that stores an integer value and increments the
counter each time it is used.

My inclination is to create a table with one record with one integer field
that is just retrieved, incremented, and updated each time I need a new
number.  

It seems sort of kludgey, and I would love to hear any other implementations
anyone may have used, or can dream up.  Also, if anyone can anticipate any
issues with this method, I would love to hear them.

 

I have no need for keeping any records of the numbers used.

 

Paul Morton

 


------------------------------------------------------------- 
Annual Sponsor - Figleaf <http://www.figleaf.com>  Software 

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink <http://www.fusionlink.com>  
------------------------------------------------------------- 




-- 
Howard Fore, [EMAIL PROTECTED]
"The universe tends toward maximum irony. Don't push it." - Jeff Atwood 
------------------------------------------------------------- 
Annual Sponsor - Figleaf Software <http://www.figleaf.com>  

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink <http://www.fusionlink.com>  
------------------------------------------------------------- 




-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to