Monday, April 28, 2008

Joe Stagner and others have produced a long line of how-to jumpstart videos on learning ASP.NET AJAX and the community supported AJAX Toolkit control extenders.  Video 3 of 72 , How Do I: Use the ASP.NET AJAX CascadingDropDown Control Extender, has some errors that may cause some newbies to get hung up on learning these tools, which is a shame.

First off, I'm a C# developer, and the videos are written from the VB.NET mind set.  If you're like me, you'll need to note that the "shared" VB keyword is functionally the same as the "static" keyword in C#.  You'll also need to take note that the method call QuerySimpleCascadingDropDownDocument returns an array of CascadingDropDownNameValue objects, so you, like I, may miss the fact that he's returning an array from the methods GetDropDownContents and GetDropDownContentsPageMethod.

The big issue that I and apparently others came across is the fact that upon running the application as demonstrated, the dropdowns will be populated with the error message:

[method error 500]

The fix is simple: in the HTML, you must define the ServicePath as follows:

...ServiceMethod="GetDropDownContents" ServicePath="~/CarsService.asmx"...

Note the "~/" at the beginning of the ServicePath.  Without this, the service will get called, you can step into it, yet the results will be an error. 

posted on Monday, April 28, 2008 3:56:51 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Thursday, March 20, 2008

Nightly care and feeding of your Visual SourceSafe database is a must.  If you are working with a project or multiple projects of any size, this is an important task.  The challenge is that Microsoft makes it a little difficult to find the right tools to help you keep your database tuned.

The process I created and describe below has worked for me for years.  It is a bit of overkill, but has produced a stable database night after night, and has continued to work through 3 VSS version updates.

The process is a 3 step batch file:

  1. Run a base Analyze to identify any bad data, backup
  2. Rerun using -F switch (fix), backup
  3. Rerun using -C switch (compress), backup

Steps 2 and 3 are a bit redundant as they both use the fix (-f) switch.  You may chose not to use that switch both times.

Batch file code:

   1: cd c:\
   2: cd program files\microsoft visual sourcesafe
   3:  
   4: REM *** Set the base variables for directory names
   5: for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set d=%%k%%i%%j
   6: for /F "tokens=1,2,3 delims=:. " %%i in ('time/t') do set t=%%i%%j%%k
   7: set B=e:\Backups\VSS\Analyze
   8: set C=%B%\Current
   9: set S=%B%/%d%-%t%
  10: set A=C:/public/VSS/data
  11:  
  12: ANALYZE -V4 -I- -B"%C%" "%A%"
  13: for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set d=%%k%%i%%j
  14: for /F "tokens=1,2,3 delims=:. " %%i in ('time/t') do set t=%%i%%j%%k
  15: REN %C% %d%-%t%A
  16: MKDIR %C%
  17: ANALYZE -F -I- -V4 -B"%C%" "%A%"
  18: for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set d=%%k%%i%%j
  19: for /F "tokens=1,2,3 delims=:. " %%i in ('time/t') do set t=%%i%%j%%k
  20: REN %C% %d%-%t%B
  21: MKDIR %C%
  22: ANALYZE -F -I- -C -V4 -B"%C%" "%A%"
  23: for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set d=%%k%%i%%j
  24: for /F "tokens=1,2,3 delims=:. " %%i in ('time/t') do set t=%%i%%j%%k
  25: REN %C% %d%-%t%C
  26: MKDIR %C%
  27:  

The batch file has some DOS trickery to tease out the current date and time.  This allows me to rename (REN) the "\vss\Analyze\Current" directory to the time the step completed.

The result is a the following file structure in my e:\ drive:
e:\Backups\vss\Analyze\[yyyy][mm][dd]-[hh][mm][am/pm][a/b/c]
e.g.
e:\Backups\vss\Analyze\20080319-0144AMC

This structure allows me to run the backup a weekend evening and if the database goes haywire, I can get any one of the last "good" databases for recovery, even if one of the last good backups was in the middle of this batch script.  It also allows me to delete "old" backups as I see fit.  Of other note, a log file (analyze.log) is placed in the root of each backup directory, in case you want to see exactly what went down during the process.

For the record, my VSS database contains over 55k files, occupies 1.35GB on the hard drive, and this process takes ~2.5 hours to run.  If you run this during the work week (or your dev team has no life), you need to log in to the VSS database and lock it using the Administration tool, then log out.  The FIX (-F) switch will not work if any users are actively logged in to the database.  Sadly, there is no command line to lock the database.

Technorati Tags: ,
posted on Thursday, March 20, 2008 9:17:10 AM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Monday, March 17, 2008

linqpadscreen Scott Cate blogged about LINQPad today, and I must note what a great idea this tool is.  In effect, LINQPad is SQL Query Analyzer (a.k.a. SQL Server Management Studio [SSMS]) for LINQ queries.

This tool is to accompany O'Reilly's C# 3.0 in a Nutshell written by Joseph and Ben Albahari.  Not only is it a wonderful tool to debug your LINQ queries, but it comes loaded with 200 examples from the book which is great for beginning in LINQ.

The product is free, so if you are a .NET developer, download LINQPad today.  Do not pass go.

As an interesting experiment, Joseph Albarahi suggests replacing your shortcut to SQL Management Studio with a shortcut to LINQPad.  According to Joseph, "at the end of [a] week, you will actually think in LINQ, rather than thinking in SQL and translating to LINQ."  IMHO, you won't be able to completely do without SSMS as LINQPad doesn't offer table management tools, but LINQPad certainly could sit right next to SSMS.

posted on Monday, March 17, 2008 1:52:32 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Wednesday, January 30, 2008

On our dev server, we're supporting both SQL 2000 and SQL 2005 instances.  Consequently, we have named instances for each of those.  I've been having trouble with a nightly copy database process, so I've been building many copy database packages using the wizard.  Since most have been failing, I wanted to manage the packages and delete those that were obviously not working. 

2005 did away with DTS packages, upgrading them to SSIS packages providing much greater control over what you can do in a package.  They also created a different mechanism for managing the packages.  To view them, you must connect to SQL Server Management Studio, and select Integration Services.  [Interestingly, you cannot connect to Integration Services using SQL Server Authentication, a serious downfall in my opinion.  Nor, for that matter, can you provide credentials to connect; yikes.]  When I tried to connect, I received the error message:

...SSIS service does not support multi-instance, just use server name instead of "server name\instance".

Interesting.  OK, so I took out the instance and received this message:

Client unable to establish connection
Encryption not supported on SQL Server. (Microsoft SQL Native Client)

Baffling, but I found the solution.  Since you cannot specify the instance, the SSIS service must be changed to point to the "correct" instance.  (I'm not sure how this will be solved with 2008, if you want to run 2008 & 2005 side-by-side.)  You do that by editing the config file MsDtsSvr.ini.xml which is located in [c:\program files]\Microsoft SQL Server\90\DTS\Binn.

 

The file should be changed to:

   1: =====================================
   2: <?xml version="1.0" encoding="utf-8"?>
   3: <DtsServiceConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   4:   <StopExecutingPackagesOnShutdown>true</StopExecutingPackagesOnShutdown>
   5:   <TopLevelFolders>
   6:     <Folder xsi:type="SqlServerFolder">
   7:       <Name>MSDB</Name>
   8:       <ServerName>SQL_2K5_SERVER_NAME</ServerName>
   9:     </Folder>
  10:     <Folder xsi:type="FileSystemFolder">
  11:       <Name>File System</Name>
  12:       <StorePath>..\Packages</StorePath>
  13:     </Folder>
  14:   </TopLevelFolders> 
  15: </DtsServiceConfiguration>
  16: ===============================

 

where line 8 should change SQL_2K5_SERVER_NAME to the specific instance you wish to reach.

Technorati Tags: ,
posted on Wednesday, January 30, 2008 1:13:46 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Wednesday, December 19, 2007

Through a recommendation, I was turned on to Axialis Software, who makes a great icon generator tool called IconWorkshop.  The product seems amazing and offers a 30-day trial version, just in case you don't trust me.  The kicker?  They offer 3 sets of very fine icons for free, available through a Creative Commons License.

Free!  As in beer.

Go check out Axialis for your next web 2.0 application's needs.

posted on Wednesday, December 19, 2007 4:53:53 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Tuesday, November 27, 2007

You read it right.  Get a free, legit copy of Visual Studio 2008 Pro just by visiting your local Microsoft office and attend an installfest.  You better act quick, however, as spots are filling up quickly.  Tim Heuer has a list of dates with links to the western region Microsoft offices' installfest events.

I attended the Vista installfest and it was very much worth the time and effort.  As the tech decider in my company, it helped me understand the paths I'd need to take to get Vista working in my environment.  Oh yeah, and I got a free copy of Windows Vista Ultimate for my time.

posted on Tuesday, November 27, 2007 11:17:10 AM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Sunday, November 11, 2007

The ASP.NET 2.0 CSS Friendly Control Adapters 1.0 are fantastic tools.  Really amazing; you simply drop in 30 pre-built files into your application and your TreeView, Menu, GridView and various login controls stop spitting out table-based layouts and start generating CSS-compliant code.  Oh yeah, it's fantastic.

champ_kind So here I am, happily pounding out CSS formatting, dropping my login controls building, and merrily moving along my way when I dropped in the TreeView control, went to view the new page and WHAMMY!

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Love affair over. 

Far too many hours later I was able to determine that a very small piece of code on my master page was the root of the TreeView's problems.  I had a footer that was simply writing some standard copy along the lines of, "this site ©2007 My Company" and was dynamically generating the 2007 with the following code:

<%= DateTime.Now.Year.ToString() %>

Removing that code resulted in a running page.  Although removing this code and replacing it with a Label object would be a solution, I have a bad feeling this bug would come back to haunt me some time in the future.

Luckily, I found a solution buried in the forums at ASP.NET, specifically this one from Dmitry Karpenkov dated 4/4/2007.  Add a private string, a method for it, and change the SaveAdapterViewState() method for the TreeView and you're back to work.  I do need to really inspect the fix to find out if there are any negative results, but for now, I'm moving on.

posted on Sunday, November 11, 2007 3:26:30 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Thursday, November 08, 2007

Extra tip: Microsoft's Excel does a great job of finely formatting data that comes out of SQL's Query Analyzer a.k.a. Server Management Studio .  E.g. if you need to send a client or a partner some results from SQL, but don't want to spend the time un/re-formatting the results into nice columns, just copy & paste the results into an Excel worksheet.  Then, copy & past the Excel columns into your destination (Outlook email or Word doc, etc).  You'll magically end up with a nicely formatted document.

Specific to this post, I recently performed this 2 step dance. On closing Excel, I got the "Do you want to save this document" dialog, then the following dialog box:

ExcelCopyDialog

which says (from snapshot above),

There is a large amount of information on the Clipboard.  Do you want to be able to paste this information into another program later?

  • To save it on the Clipboard so that you can paste it later, click Yes.
  • To delete it from the Clipboard and free memory, click No.

Followed by the options, Yes, No and Cancel.

Being a lazy developer/user, my eyes scanned right to the yes/no/cancel buttons, and I just froze there, thinking, "Wait, what is this asking?"  Then I re-read the information, then thought hard about my intentions, then cried a little.

Developers: please do your user a little favor by just cutting to the chase on the buttons themselves.  I.e. You could keep the dialog text, but just have two buttons (why, really, have a Cancel option here?) that are:

  • Release Clipboard information
  • Keep Clipboard information

If you really want to have a "Cancel" option, explain what's going to happen after you push it.  Quick quiz: can you tell from the options above what's going to happen?  Here's a clue: if you're going to follow the above examples, it would read:

  • Go back to the document

In my opinion, if you need three sentences to explain a simple dialog on closing a document, something has gone very wrong.  To the developer behind this dialog box: you have failed the **.

** With the best regards to Tim, Mother-in-law Test has a less insidious acronym than Mother-in-law Factor, no thanks to pop culture.

posted on Thursday, November 08, 2007 12:07:37 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [1]
 Friday, November 02, 2007

image I've been looking for a great 15 minute article on how to use LLBLGen for a while.  Although there are plenty of examples on their website, you can spend too much time slogging through them just to get a simple "Hello World" app up and running.

Today I found a (year old) post by Frans Bouma performing a very straightforward step-by-step example on how to create an LLBLGen Pro project.  For anyone who's a newbie at the product, this is a great place to start.

Technorati Tags: , , ,
posted on Friday, November 02, 2007 2:01:10 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Thursday, October 18, 2007

image Situation: You've been asked by Mr. BigShotCEO to create a proof-of-concept of that new whiz-bang website idea you told him about 8 weeks ago.  Oh, and he wants it ready for an 8am presentation in the board room.

Problem: If you use PowerPoint, or better yet, iWork's Keynote, you can whip together a presentation that won't embarrass you or get you fired.  [That's assuming you don't use any sound effects, but that's another matter.]  With websites however, it becomes a bit trickier, as many application developers a(including me) are frustrated artists, not getting much beyond still lifes in high school.  Unless you have a designer available at your beck and call, your hard work might lose it's punch if the audience is concentrating on why you chose to use puce and electric orange for colors.

Solution: there are a few good sites out there that will do the job in a pinch.  Since they're free (as of this writing), and have snappy interfaces, you can get a fairly unique and (generally) visually acceptable site with nominal lifting.  Getting the design out of the way will allow you to concentrate on the task(s) at hand.

Free logo design

  • LogoMaker.  Good: the site allows you to position the graphic and any accompanying text however you want, using "layers" a la Photoshop.  Bad: they want your personal info.  Use: create your logo and take a screenshot.  Sure, you'll have hash marks, but this is just a demo.
  • VistaPrint.  Good: no hash or watermarks.  Bad: no positioning of text elements.

Free web templates (available templates in brackets as of Oct 18, 2007)

  • Open Designs [761] You can search by #of columns, license type, main color and validation type
  • Open Source Web Design [2080] May be hard to find since they only show 12 a page, but all open source
  • Open Web Design [2527] Tells you up front if the design uses CSS, which can be of great help
  • Open Source Web Templates [~300?] Hard to search, as proven by the inaccurate number of designs
  • Smashing Magazine They have more links, so I couldn't exclude them; good if the others fail

So there you have it.  I hope you get a big promotion and commensurate raise by Mr. BigShotCEO.

posted on Thursday, October 18, 2007 5:37:53 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Wednesday, September 26, 2007

Somebody forgot the admin password for our Visual Source Safe 2005 (VSS) install. I think that jackass was me.dunce

Crap.

OK, well, off to my search engine of choice..."lost vss admin password" and the first link is a forum thread that seems to be completely implausible.  Mainly because it's six years old, but also because it's impossibly simple (if you're not afraid of hex editors).

You know what?  It worked like a champ.  Here's the tip:

  1. find the um.dat file sitting in your ...\VSS\data directory
  2. back it up.  No, seriously.  If you jack this up, it's not my fault.
  3. Load up your favorite hex editor of choice  (I didn't have one on hand and didn't want anything heavyweight doing anything behind the curtain, so I found, downloaded and used frhed)
  4. Open um.dat and change bits 80 through AF** to be:
    0:80 55 55 bc 7f 41 64 6d 69 6e 00 00 00 00 00 00 00
    0:90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0:a0 00 00 00 00 90 6e 00 00 a8 01 00 00 00 00 00 00

** YMMV: If you have users with names that (alphabetically) are lower than "Admin", then your Admin password location may not start at 80.  In that case, watch for the string in your hex editor and change accordingly.  Luckily, this was not my problem.

In a nutshell, what you just did was reset the Admin password to the base install (empty) setting.  In your editor, you'll see that 85-89 spells "Admin", and if you have other users, you'll see their names further down.

Now, open up your VSS Administrator tool.  If you did it right, you will be greeted with the Administrator toolbox with all of your users' login names staring at you.  Worst case, the tool will bark at you and will ask you to run Analyze.exe.  Very worst case, you need to put your old um.dat file.

As for me, I can take off the Dunce Cap and get back to work.  As for the team in charge of VSS?  Well, I'd suggest they hit the books.

posted on Wednesday, September 26, 2007 5:56:58 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Monday, September 24, 2007

This message is for me.  If you, the reader, like this list, you're welcome to bookmark either Scott's site or mine, but I need this link here to save me the 5 minutes of my life I lose every time I go looking for the list.  Scott's a prolific writer, and digging through his "Tools" tag isn't simple.

That was a horrible sentence.

Without further adieu, Scott Hanselman's 2007 Ultimate Developer and Power Users Tool List for Windows.

posted on Monday, September 24, 2007 11:15:41 AM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Sunday, September 23, 2007

After setting up a few different domains to use Google Apps (specifically Google Analytics and Gmail), I've found a few best practices and an order to make the process go a bit more smoothly.

Before we get started, I'm assuming that you have a domain name set up with the registrar of your choice.  If you don't have any preference, I'd suggest you use GoDaddy.  Their UI is horrific, but their prices are fantastic.  I've on occasion had to deal with their customer service, and they've been top notch.  I'm also assuming that you have the rights and the skills to edit DNS entries and add JavaScript to a website.  The latter isn't life-or-death, but you won't be able to use Analytics.

From here down, let's call your domain "mydomain.com".

  1. Set up a new "root account" email  Even if you have an existing Gmail account, it's best to have an account dedicated to mydomain.com.  This is especially so if you have or maintain many domains, and are planning on moving them to Google Apps.  The big payoff for this is step #8 (below).  So,
    • Visit Google and sign up for a new Gmail account.
    • Hint!! Use [mydomain.com]@gmail.com as your Login Name.  This will keep things nice and tidy, and you'll never have to guess what your admin account name is.
    • Make sure to use a strong password and save it somewhere safe like VirtualKeyChain.com
  2. Sign up for Google Apps  Creating your Google Apps account gives you access to all of the fun Google toys, like Gmail, shared calendar, and online spreadsheets among other features.
    • Visit Google Apps and pick the option that best fits your organization: small, enterprise, school, or family/group
    • Sign up using the "root account" email you created above, i.e. mydomain@gmail.com
    • For the Apps account, you'll need to create an administrator account login.  I suggest something very original, like admin@mydomain.com or administrator@mydomain.com.
    • Hint!!  It's easy to forget (or not notice) this, but you and all users can reach their shared domain Google page via http://partnerpage.google.com/mydomain.com
  3. Verify your domain ownership  This step proves to Google that you are really who you say you are, and you do indeed have the rights to the domain.  Google has a good FAQ on what this is all about.  Follow the link at the top of your Google Apps dashboard that says "Verify your domain."
    • You can perform this verification by either creating an HTML file on your root website at mydomain.com, or by creating a CNAME record in your DNS entries.  Pick your poison, and follow the instructions.  Google will provide you with a unique CNAME or html page that you need to add to DNS or your website (respectively).  Hit 'Verify' once you're done.
    • The verification process may take 48 hours, especially if you use CNAME
  4. Gather all existing email account information  This is important, as midway through the next step, you're likely going to lose access to your old mail server. 
    • If there is a way to export user names and passwords, do so.  If you can't do that, at least copy all of your email names to manually generate accounts in Gmail.
    • Send out a warning to all users to make sure to download/read all mail on their server
  5. Activate Gmail  Before starting this step, make sure your client knows their email server is changing.  Once you set your DNS entries, the web will start propagating the change which will likely cause some confusion.  You'll notice that on your Google Apps dashboard, Email is the only application not activated by default.gapps-InactiveMail
    • Click on "Activate Email" and read the instructions for setting up your DNS entries for your MX records.  There should be around 7 MX records.
    • Go to your DNS manager and add those records as shown, making sure to delete any existing MX records you currently have.
      • You may not be able to set the priority exactly as Google suggests, but just get the order right, i.e. set ASPMX to the lowest (0, 1, 5, etc), then ALT1 & ALT2 to the next, and so on.
    • Click "I've completed these steps" and wait for Google to "see" your MX changes.
  6. Add Email accounts
    • Using the information you collected in step 4 above, generate new users.  
    • Per RFC requirements, make sure to add postmaster@ and abuse@ addresses.  Because Gmail automatically (and quietly) listens to those accounts, you can only create these as "lists," but that's a preferable method.  When you create them, you'll see "Google Support" is already in the distribution list
  7. Sanity Check: make sure you don't have any DNS issues  I'm a fan of the free DNS tools available on the web, my favorite being DNSStuff.com.  You can just type your domain in and get a report of all of the potential or real issues with your DNS records.  Since you just fooled with your DNS, it always helps to have a fresh check to make sure you didn't do anything "bad."
  8. Sign up for Google Analytics  Outside of Gmail, Google Analytics is definitively the crown jewel in the set of domain applications.  What's very odd about this tool however, is a) Google does not include this application in it's set of applications for domains, and b) you cannot use a non-@gmail.com domain email address to sign up for AnalyticsThis is why step #1 up above was so key.  You can now sign up for analytics using your mydomain.com@gmail.com account, and keep your stable of applications all together. 

Where are we now?  We now have a single Gmail account that serves as the home for all administrative communications on our Google Apps.  This isn't as simple as it sounds.  Although you could have used any old Gmail account, what happens if you want to give administrative rights to someone else you work with, or the client themselves?  You certainly wouldn't hand over your personal Gmail account login, but this is now an easily transferable object.

posted on Sunday, September 23, 2007 3:28:50 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Wednesday, September 19, 2007
sqlloginbug

I'm running SQL 2005 client tools version 9.00.3042.00.  Every morning I connect to my dev server to run queries, analyze data, etc.  Despite checking "Remember Password," the MSSMS (horrible acronym, by the way) dialog refuses to remember the password.  This is by no means a show stopper, but it certainly is frustrating, especially if you use strong passwords.

If you're witnessing the same behavior, please tell Microsoft by voting "up" this bug, and they'll work the issue.

Technorati Tags: , ,
posted on Wednesday, September 19, 2007 10:18:45 AM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Friday, September 07, 2007

Coming from nearly 10 years of experience of setting up various flavors of Microsoft IDEs on various flavors of Microsoft OSes, I thought this would just be another walk through the park.  After reinstalling Vista 3 times, I decided that the park I was walking through looked more like the one in Escape from New York, rather than something from Georges Seurat.

I'm assuming you're working on industrial-strength, two-tier applications, requiring SQL integration.  I'm also assuming you've backed up everything that might possibly have any value to you.  This isn't a post about combing through your old stuff, so I'll leave you to your own devices to get that done.

If you're ready to take the plunge, here's the software you're going to need to have ready in order to make the process less painful:

Pre install checklist:

  • Download and upgrade the latest BIOS for your make/model computer.  [I run Dell hardware; here is their support website.]
  • (optional) Get your wireless router access passwords
  • make sure you've backed up all of your old project files, and wwwroot\ directory
  • check in any code that you might have still checked out
  • I would additionally suggest that you max out your RAM before the install.  Vista demands a ton of memory, and Visual Studio is no lightweight.  Add SQL on top of that, and your Office products and you're asking for trouble.  I'm currently running with 1GB or RAM and although it's working, the machine is anything but speedy.  Installing the RAM before installing Vista will allow you to verify that the RAM is working well prior to changing the mix.

Now, clear off a calendar day.  Seriously.  This is not a 2 hour process, but rather a 5-6 hour marathon.  The only alternative is to run this in chunks.  I did the latter on my notebook using a new HDD for Vista.  Every morning, I would drop my old XP drive in, work, then every night (for a week) I'd plop the Vista HDD in, and continue along.  It's your choice.

Installing the enterprise VS2005 development environment:

[update 10/30/07: I forgot to include the (new) step 8 of altering the IIS settings.  I'm assuming you're running a version of Vista that has IIS, and you'll be installing features from SQL (i.e. Reporting Services) that wants IIS6.0.]

  1. Breath deeply. 
  2. (optional) if you're physically connected to your LAN, disconnect your NIC.
  3. Install Vista.  Go take a walk, ride your bike, or start a vicious game of faceball.  This will take a while.
  4. Install your virus protector.
  5. Connect to the internet by physical or wireless methods; if you can't, install the NIC drivers you downloaded above
  6. Update Vista.  Continue playing faceball.
  7. Disable the User Account Control (UAC) "feature".  Until Microsoft figures out how to get the IDE installer and debugger to work nicely within the UAC, you're just going to have to work without a net.
  8. Change IIS settings to use IIS6.0 compatibility.
  9. Install SQL 2005.  You have a couple of options here.  You can either work from the 3 disks you have from above (SQL, SP2, BOL), or you can just copy all of the contents of those disks on to your local HDD.  The benefit of the latter is that you can slipstream the BOL into the SQL install, thus skipping step 10 below.  DBAZine has a great how-to on both installing SQL, and slipstreaming the BOL.
  10. Upgrade SQL 2005 to SP2
  11. (optional, see step 8) Upgrade your Books Online for SQL 2005
  12. Update Vista again, just to be sure there isn't anything new.
  13. Install Visual Studio 2005.  You're going to get some warnings that VS2005 has some known issues running under Vista.  That's ok, as we'll later patch those issues with the SP for Vista.
  14. More faceball.
  15. Install Visual Studio SP1.  Memory serves me that this took an inordinate amount of time to run, but YMMV.
  16. Install Visual Studio SP1 Update for Vista
  17. (optional) Install your source control client (e.g. Visual Source Safe)
  18. Again, check Windows Update.

Now, with the (obvious) exceptions of your productivity suite (i.e. Microsoft Office), and getting the OS tweaked, you're ready to start developing.

Good Luck!

posted on Friday, September 07, 2007 12:38:47 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]
 Thursday, September 06, 2007

An app that I've been maintaining for a few years was due for an upgrade from SQL 2000 to SQL 2005.  One of the features of the app is the ability to collect surveys.  Surveys, being what they are, have many types of answers, and the original solution to this was to create answer columns of a generic type VARCHAR.  (OK, ok, don't kill me on this one.  The deal was done on this architecture decision years ago, so there's no point rehashing it now; nor can it for reasons I won't get into here.)

The client came back after the original design and wanted to start performing aggregations and reports on the answers supplied, i.e. averages, standard deviations, etc.  That was all fine and good until we started to realize that some of the responses weren't expected.  E.g., How many times do you see the doctor per year?  was answered "five", "5", "4-6", and "n/a." 

An early decision was made to drop the undecipherable responses and only count true numbers, ignoring non-numeric answers via a WHERE clause, and casting the numeric representation as a decimal, integer, or some other real numeric object; this is known as an "unsafe expression."  This solution worked like a champ for 3 years... until we migrated to SQL2005.

Here's a good example of what broke:

 1: create table dbo.aaaTestBreak ( 
 2: myColumn varchar(25) 
 3: ) 
 4: insert aaaTestBreak select '25' 
 5: insert aaaTestBreak select '-10' 
 6: insert aaaTestBreak select '14.7' 
 7: insert aaaTestBreak select 'matt birmingham' 
 8:  
 9: select 
 10: avg( cast(myColumn as real)) as AverageValue 
 11: from