Up From The Ashes

Code/Development

'Unable to Cast COM Object' Error With SQL Server 2008

I have encountered an error that was driving me nuts: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). (Microsoft.VisualStudio.OLE.Interop) Googling and Binging revealed I'm not the only one to have this issue.  I even tried the fixes here: http://social.msdn.microsoft.com/Forums/en-US/sqltools/thread/6d0f23e5-14fd-4a32-b37d-33458c339b14 with no luck.  This is the second machine (same machine actually, just reinstalled Windows 7 RTM) and had the same error occur.  I got lucky this time, though, in...

Date Without Time When Serializing

I'm serializing a class in .NET and have a DateTime field.  It's getting serialized as: 2009-11-01T00:00:00 When what I really want is something without the time like this: 2009-11-01 Brad Abrams has a great post that has how to do this (plus a lot more).  Simply add this attribute to the property: [XmlElementAttribute(DataType="date")] This is probably basic to some, but was helpful to me.

Microsoft Integrating JQuery with VS

Someone in the blogosphere (can't remember who) had recently said they would like to see Microsoft start working with open source projects, include it in their products and yet leave it unchanged and open source, all the while contributing back to the original project. Well, they're going to include JQuery in Visual Studio going forward as well as other products. It will have IntelliSense support, too! This is great news from Microsoft and hopefully the beginning of much more support for open source projects. The announcement by Scott Guthrie is at http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx Here's another announcement by a member of...

A Geek I Am

I'm reading/learning/studying LINQ using the book "Pro LINQ: Language Integrated Query in C# 2008" by Joe Rattz.  First, I must say it's an outstanding book - the writing is clear, littered with code, easy to read and sometimes even funny.  On page 226, Joe makes the statement: LINQ to XML actually makes traversing an XML tree fun. OMG, I am such a geek, because I was thinking almost exactly that as I read the code sample in question.

MS CRM 4.0 Error in "presence.htc"

2008-05-08 Update: Before I posted what I found, I had searched the web and found a usenet posting by Peter Zimmermann of www.ambit.ch asking the same question I was trying to answer.  I sent him a note about what I'd found.  He said they had dug through it and found the root of the problem is having contact with a blank last name.  Indeed, I found that on the page in question there were contacts that had been imported with no last name.  Thanks to Peter for the update and the further investigation. -- end update -- After upgrading a customer from MS...

Classic ASP Sucks!

I'm currently working on an application originally written in classic ASP for a customer.  Several thoughts come to mind: WhoTF would start building an app in 2007 in classic ASP instead of ASP.NET? Classic ASP sucks.  Everything is a kluge...I've had to manually write all sorts of AJAX crap, things that should take 10 minutes take 2 hours, my business logic is intertwined with the interface (I'm using classic ASP classes, but what a fake substitute for a real OO language) and performance is slow. The previous developers on this thing...

Dropping A Table in SQL CE

There's a bug in the instructions for removing a table using SQL Compact Edition that drove me nuts for about 20 minutes.  I tried the intuitive way which is what is documented in the help, but which is also wrong.  The instructions read: 1) On the View menu, click Server Explorer. 2) In Server Explorer, expand the data connection from which you want to drop a table. 3) Under Tables, right-click the table you want to delete, and then click Drop Table. 4) In the Delete Objects dialog box, click Remove, and then click OK. Step 4 should simply read "Click OK".  That will drop...

SanDisk Cruzer U3 Drive Trouble

My wife gave me a 4GB SanDisk Cruzer U3 drive for Christmas.  I ran into trouble with it on my Vista desktop at the office where I kept getting an error where Vista recognized the device, but it couldn't find the specified files when it attempted to install the drivers.  I finally found a solution after lots of searching the web.  In an effort to get the info out (not that anyone ever reads this lame blog, but I do seem to get lots of search hits) I found that the suggestion by "ABACTech" dated 10/26/2007 11:25 a.m. on this...

Strange Error on Virtual PC

Entry updated 2008-02-13... I've figured out the actual cause of error message "The virtual machine is using a video mode that is too large for your monitor" and a way to solve the problem without a reboot.  Consider the following scenario: You have 3 computers: a work PC (a physical machine), a home PC (also a physical machine), and a VPC running on your work PC.  You have a nice big 20" monitor at work and set the video mode on the VPC to a resolution to take advantage of your work PC's display capabilities (say, 1600x1200).  It's capabilities, however, are beyond...

Those Stupid Web Pages!

I was googling something technical the other day (I don't even remember what), and came across this page.  As I was browsing the page to see if it would help, I found this: “I ponder if companies will realize everyone has not jumped on the lame "my god we gotta have a web page" syndrome.” Yeah, that web page thing hasn't worked so well.  Jeff

Office Language Bar

The Microsoft Office Language Bar has an annoying habit of activating itself on install.  You can right click on the toolbars and select "disable" and when you reboot, voila, it comes back.  I've heard that this has especially become an issue for people after installing IE 7.  I don't know if the link below fixes the issue as related to the IE 7 install, but if the issue for me which happened long before IE 7 was installed. This post is as much self serving as it is to help - I can never seem to find (easily, anyway) the Microsoft...

Acrobat PDF File Size

I've been working on a project where I am dynamically filling form fields on a PDF using the PDFToolkit from ActivePDF.  It's been great, with one exception. The customer had created their PDF and sent it to me to actually put the PDF form fields on it.  When they sent their base document, it was 35K.  I noticed that when I opened it, made my changes and saved it, it was 279K, almost 8x larger, even if I made a change and then used "undo", effective making no changes. Google to the rescue.  I found this article on PDFs, which explained why. ...