Feb 10 2008

QuickFormatter: Reformat a column for SQL or email with a single click

QuickFormatter

I don’t really know how best to describe this application, so I’ll just explain why I wrote it.  I tend to do a lot of work for marketing departments, and marketing tends to love Excel.  They give me spreadsheets containing email addresses, tradeshow leads, customer lists, etc… And then they want me to use these spreadsheets to pull data from a database, send an email newsletter, or do miracles.

For quick ad-hoc queries I found myself writing SQL with WHERE IN clauses, and using the data from a one of the columns in the spreadsheet.  So this application lets you copy a single column and paste it into the application window. Click a button and instantly the column is converted to being quoted and separated by commas for use in an IN clause.  You can also separate the fields by semi-colon or comma. See the screenshot below for a better idea of what it does.

Screenshot


Feb 6 2008

SubSonic: All Your Database Are Belong To Us

I’m a lazy programmer. Don’t get me wrong, I think that’s a good thing. I believe it drives me to come up with innovative solutions for problems that I’m too lazy to deal with on a regular basis. This frees me up to work on the things that I enjoy, while spending less time on the tedious.

Lately I’ve turned to CMS systems like Kentico, Drupal, and Joomla when I’m creating websites, because I can spend more time on the design and layout and less time developing the backend.

Sometimes, I want more control than a CMS allows, and I want to write more code. In the past I’ve written my own data access layer, and in most cases that works just fine. However, i “need to spend more time with [my] friends, family, dog, bird, cat…” so I started looking for solutions…and I found several:

To be fair, I only tried the first three because they’re open source (free), and in the end, SubSonic met all my needs. It is easy to use. All you really need to do, it setup the database connection string in the app.config/web.config file, run a macro, and sit back and drink your coffee. In the end you’re presented with a couple classes for each table in your database.

Then creating a table record is as easy as:


user = new UserObject(1);
user.FirstName = "Adam";
user.LastName = "Conde";
user.EmailAddress = "myemail@something.com";
user.Save();

Querying is similarly easy.
Check it out for yourself: SubSonic: All Your Database Are Belong To Us