Re: CF Code to create AutoIncrement column MS SQL?

2009-04-23 Thread Dominic Watson
Try running: dbcc checkident("tablename", RESEED) If the identity seed has been reset, this should reseed it to the current highest PK value (ie. fix it without needing to create new columns). You can also use checkident to see what the current seed is and also to set it to any value you desire,

Re: CF Code to create AutoIncrement column MS SQL?

2009-04-23 Thread Maureen
Studio Express or Toad for MS SQL both have free versions you can download. On Thu, Apr 23, 2009 at 9:51 AM, Dawn Sekel wrote: > > Hi Robert:  Yes, that would be the best way.  The problem is, I'm working > from home, don't have any SQL tools installed on my home computer.  So I was > trying t

RE: CF Code to create AutoIncrement column MS SQL?

2009-04-23 Thread Robert Rawlins - Think Blue
wn Sekel [mailto:dse...@ciber.com] Sent: 23 April 2009 17:51 To: cf-talk Subject: Re: CF Code to create AutoIncrement column MS SQL? Hi Robert: Yes, that would be the best way. The problem is, I'm working from home, don't have any SQL tools installed on my home computer. So I was trying

Re: CF Code to create AutoIncrement column MS SQL?

2009-04-23 Thread Dave Watts
> CFTransaction is a good thought -- thanks -- I had thought of CFLock.  I just > wasn't sure > what would be the best way.  Long term though -- do you think it is better to > redo the > database?  I was trying to do the quickest fix because it is a freebie. The quickest fix is to use CFTRANSAC

Re: CF Code to create AutoIncrement column MS SQL?

2009-04-23 Thread Dawn Sekel
CFTransaction is a good thought -- thanks -- I had thought of CFLock. I just wasn't sure what would be the best way. Long term though -- do you think it is better to redo the database? I was trying to do the quickest fix because it is a freebie. Thank you for everyone's help. Dawn >> I ha

Re: CF Code to create AutoIncrement column MS SQL?

2009-04-23 Thread Dawn Sekel
Hi Robert: Yes, that would be the best way. The problem is, I'm working from home, don't have any SQL tools installed on my home computer. So I was trying to think of a short cut that I could modify the table using Coldfusion. The database is a student test answer repository -- so they neve

Re: CF Code to create AutoIncrement column MS SQL?

2009-04-23 Thread Dave Watts
> If you're just running into occasional collisions, you could use > with an exclusive lock to limit that part of the code so that it can only be > run by one thread at a time (others will get queued up and wait for the > first to complete. If you want to enforce transactional behavior on the da

Re: CF Code to create AutoIncrement column MS SQL?

2009-04-23 Thread Dave Watts
> I have a customer whose programmer has vanished and he is trying to get his > application back on line.  I'm an intermediate CF programmer and I've managed > to > get everything working again except for one problem.  His database is hosted - > and somehow, when he restored his application, the

RE: CF Code to create AutoIncrement column MS SQL?

2009-04-23 Thread Justin Scott
> Does anyone have any Coldfusion code to insert a new > autoincrement key field in to a MS SQL table and then > remove the old one? Or is there a way to modify a key > field to autoincrement? If you're just running into occasional collisions, you could use with an exclusive lock to limit th

RE: CF Code to create AutoIncrement column MS SQL?

2009-04-23 Thread Robert Rawlins - Think Blue
operties' pane at the bottom expand the 'identity specification' section, you'll then be able to set the column to an identity and have it auto increment. Hope that helps, Rob -Original Message- From: Dawn Sekel [mailto:dse...@ciber.com] Sent: 23 April 2009 17:26 To:

CF Code to create AutoIncrement column MS SQL?

2009-04-23 Thread Dawn Sekel
Hi: I have a customer whose programmer has vanished and he is trying to get his application back on line. I'm an intermediate CF programmer and I've managed to get everything working again except for one problem. His database is hosted - and somehow, when he restored his application, the fi