What’s the point to enclose select statements in a transaction?

You’re right: at the standard isolation level, read committed, you do not need to wrap select statements in transactions. Select statements will be protected from dirty reads whether you wrap them in a transaction or not. connection 1: connection 2: begin transaction update user set name=”Bill” where id = 1 select name from users where … Read more

What is the best practice use of SQL Server T-SQL error handling? [closed]

You should read this: http://www.sommarskog.se/error-handling-I.html I can’t recommend that link highly enough. It’s a bit long, but in a good way. There’s a disclaimer at the front that it was originally written for SQL Server 2000, but it covers the new try/catch error handling abilities in SQL Server 2005+ as well.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)