Tag Archives: SQL

More than 100,000 articles !

13 Apr

In one month, we already got more than 100,000, and we continue to crawl! We plan on hitting 250,000 total articles next month.

Due to the large amount of data we are gathering, we are planning on updating our SQL stored procedure to improve performance. We may be migrating to SQL Server 2008 Entreprise, as we are currently running on SQL Server 2005 Express Edition… We are at 400 Mb of data, getting more and more close to the 2 Gb limit.

Stay tune for more info and browse daily fresh articles about web development.


Good SQL error handling in Strored Procedure

11 Mar

When writing SQL procedures, it is really important to handle errors cautiously. Having that in mind will probably save your efforts, time and money. I have been working with MS-SQL 2000 and MS-SQL 2005 (I have not got the opportunity to work with MS-SQL 2008 yet) for many years now and I want to share with you how I handle errors in T-SQL Stored Procedure. This code has been working for many years now without a hitch.

N.B.: As antoher “best pratice”, I suggest using only ONE level of TRY … CATCH and only ONE level of TRANSACTION encapsulation, as doing otherwise may not be 100% sure.

See the full article and source code at http://www.developerit.com/2010/03/16/good-sql-error-handling-in-strored-procedure

In conclusion, I will just mention that I have been using this code with .NET 2.0 and .NET 3.5 and it works like a charm. The .NET TDS parser throws back a SQLException which is ideal to work with.
Published on http://www.developerit.com/