Jon Galloway
-
Code Puzzle #1 - Solution
If you haven't read the puzzle, you can read more about it on my previous post.
-
Code Puzzle #1 - What numbers under one million are divisible by their reverse?
The other day I got stuck waiting in a slow line at the store all hopped up on espresso and breakbeat, so I started trying to think of numbers which are evenly divisible by their reverse. Example: If 721 were divisble by 127, I'd have a match. Yes, I'm aware this is not normal behavior.
-
Animated GIF Plugin for Cropper + some .NET Animated GIF code
Cropper is a great free screen capture program. It has a cool plugin system which lets you send the screenshots anywhere you can write code to send it. I wrote a plugin to save a portion of the screen to an Animated GIF.
-
Handling "GO" Separators in SQL Scripts - the easy way
If you've ever had to execute one or more SQL scripts from ADO.NET, you've likely run into the GO batch terminator issue. Any SQL script that does anything worthwhile has more than one batch, separated by a GO terminator. The problem is that "GO" isn't valid T-SQL, it's just a command used by the SQLCMD, OSQL and ISQL utilities that can also be used within Query Analyzer and the Query Editor window. If you try to execute T-SQL scripts with GO commands in them via ADO.NET SqlCommand.ExecuteNonQuery, you'll get an error that says something like:
-
SQL Puzzle #1 - Answer
Here's my solution to the puzzle in my previous post. If you haven't seen the challenge, go back and read that first.
-
SQL Puzzle #1
I had to write a semi-interesting SQL query this past week and thought it might make for a fun SQL puzzle (for very small values of "fun").
-
Showing a Connection String prompt in a WinForm application
When I was putting together the Data Dictionary Creator program, I needed to allow users to input a connection string. A lot of winform applications that require data connections give you a textbox and tell you to figure it out yourself, but I really wanted to show a prompt that let you test your connections, select databases on a server, etc.
-
Reading the SQL 2005 instance and installation directory from a DOS batch file
SQL 2005 installs each instance to a numbered directory based on the order installed: MSSQL.1, MSSQL.2, etc. That makes scripting a little tricky. Fortunately, you can find them in the registry.