Archive for March, 2010

Random scripts

By admin - Last updated: Sunday, March 7, 2010

SQL transaction try catch template BEGIN TRY BEGIN TRAN – sql goes here COMMIT END TRY BEGIN CATCH SELECT ERROR_NUMBER() AS ErrorNumber ,ERROR_SEVERITY() AS ErrorSeverity ,ERROR_STATE() AS ErrorState ,ERROR_PROCEDURE() AS ErrorProcedure ,ERROR_LINE() AS ErrorLine ,ERROR_MESSAGE() AS ErrorMessage ROLLBACK END CATCH Very nice blog around WCF security http://www.leastprivilege.com Search object name within SQL database SELECT name [...]