I have to wonder what application you are creating that is so space
conscious that you have to re-use identity values.

  That said, search your SQL Server documentation for SET IDENTITY_INSERT,
which will allow you to insert values into an identity column.

  As an alternate, you may consiuder using all columns in the row to be
your PK.  This is usually only done in intersection / linking tables, but
can be done anywhere.  I may meet your need.

At 09:01 PM 5/31/2004, you wrote:
>Subject: creating reusable primary keys
>From: "Nick Cabell" <[EMAIL PROTECTED]>
>Date: Mon, 31 May 2004 16:53:18 -0700
>Thread:
>http://www.houseoffusion.com/cf_lists/index.cfm/method=messages&threadid=32900&forumid=4#165087
>
>I guess this is more a DB question, but I'm thinking there is some
>wisdom on how to create PKs in CF that I don't have.
>
>I am being space conscious and have declared a PK for a table
>with a data type of TINYINT because I will never have more than
>255 records. My records don't have suitable unique values so I wanted to
>use the IDENTITY attribute in SQL Svr to automatically create the
>primary keys. Trouble is that once I delete one of the records,
>that PK value will never be used again.
>
>Is there a clever way in CF to create the PK yourself and be
>able to reuse the value when it is deleted.
>
>
>Nick Cabell
>451 Learning Systems
>(650) 823-1858

--
Jeffry Houser, Web Developer, Writer, Songwriter, Recording Engineer
<mailto:[EMAIL PROTECTED]>
--
AIM: Reboog711  | Phone: 1-203-379-0773
--
My Books: <http://www.instantcoldfusion.com>
Recording Music: <http://www.fcfstudios.com>
Original Energetic Acoustic Rock: <http://www.farcryfly.com>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to