Tag: sql

  • Template for SQL Server Stored Procedures

    Talking with our in house DBA, it was mentioned that DROP/CREATE is a bad model to follow when updating stored procedures. However, this is the model used in the stored procedure template provided by Visual Studio 2005/2010. Here is a modified template that creates an empty stored procedure if it doesn’t exist and performs an […]

  • Enterprise Library Data Access Application Block + SQL Optional Parameters

    The Enterprise Library Data Access Block provides a number of ways of calling a stored procedure. Database _db = DatabaseFactory.CreateDatabase(<Connection String Name>); Let’s now assume that we have a stored procedure usp_MyStoredProc that takes a single parameter @param1. If this is a require parameter, both of the following statement blocks will result in the same […]