Geeks With Blogs
Wil Peck Experience is something you get right after you need it. August 2010 Entries
.NET SQL Parser
Ever need to parse SQL Syntax using .NET without actually executing the SQL? Pretty sweet because you can actually do this with built in sql server options. Works out pretty well. Executing a statement with a syntax error, referencing an object that doesn’t exist, a stored procedure with parameters that has no parameters, etc produces a SqlException with an appropriate error message. 1: static void ParseQuery(string sql) 2: { 3: SqlConnection connection = new SqlConnection("some_connect... ......

Posted On Thursday, August 5, 2010 11:34 AM

SQL Server DB Row Counts
Recently I was tasked with the responsibility of purging database from one of our SQL 2000 databases. One of the test cases is to use a copy of a database that is a small production database and delete all of the data contained within. After the delete is executed then I can review the data tables and see what is left over or was skipped after the delete script runs. Looking at the properties of hundreds of tables in Enterprise Manager seemed pretty tedious. After a quick query to Bing I was able ......

Posted On Monday, August 2, 2010 4:18 PM

Copyright © Wil Peck | Powered by: