Outlook 2007 Preview Pane made useful…

Posted October 28, 2008 by quarksoft
Categories: Programming, Software, Utility

Tags: , , ,

I finally had upgraded to Outlook 2007 about a month ago and one of the features I found myself using a lot was the Preview feature for attachments. It was great for the PDF and the typical office documents, but there were no preview handlers for files such as WAV. I have a VOIP line that emails me the voice mail messages that have been left so having a WAV previewer would be really useful for me.

During my search for such a feature I ran across a great utility from Gil Azar (and in his post gives credit to lots of others for their help). You can download the ultimate Outlook 2007 preview handler from his site.

If you are interested in some of the technical details Gil discusses them on his page and provides some really great links.

I’ve included parts of Gil’s original post just in case his site disappears one day.

A self-extracting installer, which silently installs Stephen Toub’s MSDN Magazine Managed Preview Handler Framework and Gil’s small addition, can be downloaded here

Command Line FTP Client with PASV support

Posted September 12, 2008 by quarksoft
Categories: Software, Utility

Tags: , , ,

I ran into a problem scheduling the transfer of a file via FTP today.  The server was behind a firewall that required me to use PASV FTP support.  Unfortunately the command line version of FTP that comes with Windows 2003 was not able to support this configuration (at least I could not figure out how to make it support it).

In trying to figure out a solution to this issue I ran across NcFTP.  This is primarily a *nix based FTP tool (both server and client), but it has a Windows command line version of FTP that proved to be just the tool I needed.  You can download the Windows version of the client or if you prefer they have lots of *nix flavors.

Easy method to download a portion of a web site

Posted August 21, 2008 by quarksoft
Categories: Software, Utility

Tags: , , , ,

I have this client that posted several hundred files on their internal web site that I needed to download to my laptop for testing purposes.  I started downloading them one by one and thought that there must be a better way without installing some big application to do this.  With a little Google searching I found a great open source utility called wget that provides everything I needed from a command line (which had the added bonus of being able to easily script it).

An example of the command to recursively download a web site is shown below:

wget -l2 -r -k http://www.siteyouwanttoget.com/folder1

  • The -l parameter tells the software how many levels to download (I only needed 2 levels deep in my example)
  • The -r parameter tells it to download recursively
  • The -k parameter tell is to convert non-relative links into relative ones so that there will not be any dependencies on the original site.

So there you have it. One simple, small 162Kb EXE that does exactly what I needed (it also does ALOT more than this). Have Fun!

ASP.NET Session State in SQL Server

Posted June 13, 2008 by quarksoft
Categories: Uncategorized

There are lots of places to get information about putting the Session State into a SQL Server database instead of in-memory. The information I have found most useful is the utility aspnet_regsql.exe. It performs a bunch of different tasks for ASP.NET and interaction with SQL Server and the membership interfaces.

For example if you want to get session persisted across SQL Server reboots you can issue this command:

aspnet_regsql.exe -ssadd -sstype p -E -S <servername>

The sstype p is the option that allows for the state to be persisted. You can execute aspnet_regsql.exe -?

Resetting the IDENTITY counter in SQL Server T-SQL

Posted May 13, 2008 by quarksoft
Categories: Programming, SQL Server, T-SQL

Tags: , , ,

You’ve been there before.  You are busily testing your import routines and running up the Identity column in your main import table.  Before you know it the value is in the multi-millions and you just want to reset it back to 1. 

The way to accomplish this is to use the DBCC CHECKIDENT command.

For example:

DBCC CHECKIDENT (SalesForce, reseed, 0)

This assumes your table is called SalesForce and you want to start the numbering at 1.  If you wanted to start the number at 2000 you can substitute 0 with 1999.  There has been some discussion that has said if the table never had records added to it the reseed value itself will be used instead of the reseed + 1 value.  You should not need to use this statement for a “new” table.

Credit for this post is given to Pinal Dave over at http://sqlauthority.com/.  The specific post this I am referring to is the one at this page.