Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check record existence using Dynamic SQL
Message
De
29/07/2007 13:39:51
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Check record existence using Dynamic SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01244442
Message ID:
01244442
Vues:
55
Hi,
In my trigger, I use dynamic sql to check for record existence in other table before do actual update.

Currently, I am using @@ROWCOUNT to check rows after run the dynamic SQL using EXEC(). However, it affect RecordsAffected property in ADO.NET. I also tried to use "SELECT @row_count = COUNT(*) ... ", but it hit error, seem like @row_count in not accessible in dynamic sql scope.

Any workaround?

Thank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform