Monday, July 25, 2005 5:58:42 PM UTC :: Filed Under SQL

Neither humans nor computes can divide by zero, so if your SQL script has a variable in the denominator of an equation, be sure to safe-guard against a potential divide-by-zero error:

CASE
    WHEN @AveWorkDays = 0 THEN 0
ELSE
    ISNULL(SUM(CAST(ItemInventory.QtyDistributed As decimal))/@AveWorkDays, 0)
END
Wednesday, June 22, 2005 6:12:47 PM UTC :: Filed Under ASP.NET | VB.NET

I’ve been told time and time again that Microsoft’s Visual Source Safe 6.0 is not a very good application to use for managing project files, but it’s all I have and it has been working pretty well… until today.   One of my project folders apparently got corrupt; I couldn’t open the folder, delete it, rename it… nuttin’.

After trying a gazillion stupid things just short of creating a whole new VSS database and starting over, I finally discovered the ANALYZE command line tool.  Sure enough, that’s all I needed to fix the corrupted database.  The analyze tool is located in the C:\Program Files\Microsoft Visual Studio\VSS\win32 folder.

Running the following command was all I had to do to fix the problematic folder:

C:\Program Files\Microsoft Visual Studio\VSS\win32>ANALYZE –F \\server\vss\dbname\data

Here is a list of a few other VSS Utilities. Since I now know how to repair a corrupt VSS database, I’m going to continue to ignore everyone’s advice and keep using VSS in the hopes that the 2005 version will be a cure-all (yah right!) J

Tuesday, May 31, 2005 9:25:50 PM UTC :: Filed Under Fitness

One of my favorite summer activities is kayaking.  Not only is it great exercise and a neat way to see nature, my wife and I seem to get a similar work-out because she is quite a bit lighter than I am, thus she uses less effort to go just as fast as I do. 

Unfortunately, I typically find that within a half-hour of kayaking, my lower back really aches.  It aches to the point that the finishing my kayak trip sometimes becomes more of a chore than a pleasure.   I found what I think could very-well be the reason for all this pain from a user named Jed on KayakForums.com:

This may not apply in your case but some people experience back pain that is caused by hyper-extension of the lower back. Tight hamstring muscles can prevent the pelvis from rotating forward far enough to allow the lower back to maintain it's natural curve. Constant extension of the lower back then leads to sometimes significant discomfort.

An easy test for this is to sit in your boat with your normal posture and try to rotate your pelvis forward as far as you can by trying to push your belly button out towards your knees. This will contract the muscles of the lower back, rotate the pelvis forward and move the whole torso forward somewhat. If the natural curve of the lower back returns when you do this, then tight hamstrings / bad posture may be the culprit.

This type of aggressive posture does more than just relieve some types of lower back pain, it also pulls the back away from the seat back / back band and allows the paddler to balance naturally with the torso slightly forward of vertical. By returning the pelvis and the lower back to a more natural posture, torso rotation is greatly enhanced which then leads to more power from your stroke.

Lastly this posture greatly enhances the paddlers ability to work the extreme ends of the boat especially the forward quadrants and nearly eliminates reliance on any type of back support. I suspect the latter is something the back band manufacturers and sellers would prefer we did not know.

As a bicyclist who has the naughty habit of not stretching before each ride, my hamstrings are typically very tight.  Reaching my toes is nearly impossible!  I’ve always told myself that I should really integrate stretching into my fitness regimen, so perhaps now is the time to start.

Thursday, May 19, 2005 3:26:53 PM UTC :: Filed Under Geek Tips

Well, if you’ve owned the Motorola MPx220 SmartPhone for any length of time, you know it has its fair share of bugs.  Sometimes you might be convinced that a hard-reset is the only solution to some of the phone’s problems. According to a post on the Microsoft.public.smartphone newgroup, this is how you reset the phone:

To do a hard reset, hold down the round blue button while turning it on. It will then ask if you want to reset it Make sure you remove the SD and sim cards to make sure they won't get wiped-out. Some have said it will wipe both cards if inserted, but others say it's only the sim card that gets reset. I just pull them both to be sure.

Wednesday, May 18, 2005 4:47:35 PM UTC :: Filed Under SQL

Although I have to tinker with SQL, I’m no DBA.  Upon doing some research for an up-coming project, I discovered the Templates folder in Microsoft SQL Server 2000’s Query Analyzer.  However, there was a problem… even though I installed the templates, they didn’t show-up in the Query Analyzer Object Browser L

See all the pretty + boxes next to each folder in the image below (indicating that each folder contains templates)?  I didn’t have any of those… only the folders were appearing.

After racking-my-brain to figure-out what search words to use to find help on this problem, I found the problem: Query Analyzer won’t display template query files that are compressed with NTFS Compression.

To fix this, I had to turn-off NTFS Compression on each .tsql file.  To turn-off NTFS Compression:

  • To open My Documents, double-click the My Documents icon on your desktop.
  • You can also right-click a file or folder and then click Properties.
  • To change properties for archiving, indexing, compression, or encryption on NTFS drives, right-click the file or folder, click Properties, click Advanced, and then select the options you want to change.
Wednesday, May 04, 2005 4:21:07 PM UTC :: Filed Under ASP.NET | Web Design

FireFox is nice and all, but I work for a ‘Microsoft Shop’, so it doesn’t do me much good to browse the ‘Net on a Mozilla-based browser.  Yet, we all know that Internet Explorer is nearly become a dinosaur.

Well, there’s a bit of hope (and it’s free!)  I recently downloaded the Avant Browser which is basically a wrapper for Internet Explorer.  Some of the nifty features include:

·         Flash Animation Filter (Yippee! Block those annoying Flash ads.)

·         Built-in Pop-up Blocker

·         Multi-Window Tabbed Browsing

·         Real Full Screen Mode and Alternative Full Desktop mode

·         Built-in Yahoo/Google Search Engine

·         Full IE Compatibility

·         Records Cleaner

·         Safe Recovery

·         Skins

There certainly are other browsers like the Avant Browser, but I found that this one works best for my needs.

Navigation
On this page....
Search
Archives
<July 2005>
SunMonTueWedThuFriSat
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456
Categories
Contact me
Send mail to the author(s) Contact Todd M. Taylor