Home AdLockOptimistic equivalent in razor pages
Reply: 0

AdLockOptimistic equivalent in razor pages

user587
1#
user587 Published in July 19, 2018, 3:14 pm

I'm working on a .Net Razor Web Page and I want to know how to block the read registry (previously I used AdLockOptimistic in ADO) until the update is completed, my code is...

        var sqlLeeUsr = "SELECT UsrSmlla FROM tbUsr WHERE (UsrNro=@0)";
        var usr = db.QuerySingle(sqlLeeUsr, intUsrNro);
        if (usr != null)
        {
            intSecuencia = usr.UsrSmlla + 1;

            var sqlModUsr = "UPDATE tbUsr SET UsrSmlla=@0 FROM tbUsr WHERE (UsrNro=@1)";
            db.Execute(sqlModUsr, intSecuencia, intUsrNro);
        }
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.313637 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO