microsoft loves making me cry...
at work i was writing a data access layer for a project i'm leading and i discovered a fun little piece of craziness in vb.net. the data layer would successfully convert most anything i threw at it from the string that it started as to the dbtype that i specified for the parameter in the command object's parameter collection. however the trouble started when i tried to do something crazy, insert a value into a sql server uniqueidentifier column, and boom, it blows up throwing an exception saying it can't convert from string to guid. long story short after bashing my head against the wall trying to do the conversions to no avail, I finally start polking at the guid class in .net, which let me to the fact that guid has a constructor that takes a string. holy crap!!!! so it can convert strings to guids, but just not through any method that you would logically try. sure enough, convert my string to a guid and it all works. i hate you microsoft and i hope this is one of the 9 million little annoyances that's fixed in vb.net 2005
atom feed
comments(0)
link
tech