Skip to content
sides of march (Brian DeMarzo)
  • Home
  • Knowledge Base
    • Databases and SQL
  • Articles
    • C# and the .NET Framework: Tying It All Together (Part 1: Developing a Notepad-type application using C#)
    • C# and the .NET Framework: Tying It All Together (Part 2: Adding menu bars, event handlers, and application logic)
    • C# and the .NET Framework: Tying It All Together (Part 3: Adding File Operations)
    • Slack Undertow
  • About Me

Tag: bad programming

Bad Programming: How not to use try/catch blocks

Posted on June 12, 2008 | by brian | 4 Comments on Bad Programming: How not to use try/catch blocks

I just stumbled across the following SQL 2005 code:

	BEGIN TRY
		UPDATE [tabProgramSite]
		SET
			[Name] = @ProgramSiteName
		WHERE [ProgramSiteID] = @ProgramSiteId
	END TRY
	BEGIN CATCH
	END CATCH

Nothing like catching an error… and doing nothing about it. I hope the user experience isn’t as robust.

Posted in Technology | Tagged bad programming, SQL

Links

Check out the longest-running multiplayer baseball simulation: CSFBL!

  • LinkedIn
  • Upwork
  • GitHub

Recent Posts

  • Reading appSettings from Web.config into Classic ASP
  • Ask yourself six questions before building the Next Big Thing
  • Extending DbSet for easy filter expressions
  • When the escape fails
  • Use compiler directives to hide test code

Categories

  • Best Practices
  • Liberty
  • Personal
  • Technology
  • Uncategorized

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2023 sides of march (Brian DeMarzo) | Bootstrap WordPress Theme