Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoiding multiple cascade paths
Message
De
24/08/2008 14:11:35
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01340693
Message ID:
01341388
Vues:
14
Thx Sergey,

In this particular instance I can prevent anyone else messing with the database but I've changed it anyway and will use your suggestion in the future,
Regards,
Viv

>The '@@ROWCOUNT > 0' is not reliable way to check for # of inserted record. What if somebody adds one more INSERT trigger that would fire before yours? The following is better
>
>IF NOT EXISTS ( SELECT 1 FROM Inserted )
>
>
>>I added a check for @@ROWCOUNT > 0 in the trigger which cured the problem. So would, for instance. a DELETE trigger fire even if there were no actual deletions ?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform