Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record Lock
Message
De
03/03/2003 10:30:58
 
 
À
03/03/2003 10:10:50
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00760359
Message ID:
00760367
Vues:
18
Randy,

I know this doesn't answer your question, but how about using an IDENTITY column instead for your PKs. They are automatically generated by SQL Server and you don't have to do a thing:
CREATE TABLE MyTable
      (MyPK bigint NOT NULL IDENTITY.
       ... rest of the columns)

ALTER TABLE MyTable ADD CONSTRAINT
      PK_MyPK PRIMARY KEY CLUSTERED
     (MyPK)
~~Bonnie


>Hello all, I use a table to keep track of my primary keys. Basically the table contains a field for the tablename and a field for the next available primary key. Is there a way to lock the sql server record until I update it? Also can I run a loop checking the status of the lock so I can grab another lock as soon as the first lock is complete? Thanks for the help.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform