Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Issues on IDENT_CURRENT , SCOPE_IDENTITY
Message
De
13/12/2004 19:04:09
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Issues on IDENT_CURRENT , SCOPE_IDENTITY
Divers
Thread ID:
00968948
Message ID:
00968948
Vues:
63
hi
I used IDEN_CURRENT mostly in my Store Proc. But in this case the IDEN_CURRENT returns .NULL. value, but when I use SCOPE_IDENTITY it works fine.I have a lot of store proc that uses IDENT_CURRENT() i just wondering if I have to re-write all those store proc.I there any idea or maybe im in the wrong track. tnx




heres the scenario

I have a view vPaymentDetail from "transdetail" table

While (LOOP)
begin


insert into vPaymentDetail()--- Something


set @PkTranDIDDeposit=IDENT_CURRENT('vPaymentDetail')

-- RETURNS NULL
print @PkTranDIDDeposit


set @PkTranDIDDeposit=SCOPE_IDENTITY()
-- RETURNS IDENTITY
print @PkTranDIDDeposit

--- SOME CODE FOR COUNTER


end
Roses are #FF0000 Violets are #0000FF all my base are belong to you
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform