Saturday, January 20, 2007

SharePoint 2007 and the .NET 2.0 Object Data Source

One of the smartest SharePoint gurus I know is Sean Skinner. Lucky for me, he was guillable enough to be fooled into coming to work for my company, so now I get to take advantage of all his know-how on a daily basis. Like, for example, when one of our SmartForms apps blew up all over the place, and we couldnt' figure out what in the world was going on, Sean kept at it until he had the answer. From his blog:

You cannot have an Object Data Source running on MOSS and it have a parameter (insert, update or otherwise) with a type of 'object'. This appears to be the type assigned for GUIDs (database fields of type 'unique identifier'). When you do, as soon as I would bind the formview I would get a generic MOSS error page. You know the one, 'A web part is causing a problem....'By changing the type on the parameter to 'string' everything started working...


(BTW, when he refers to ASP:Table elements junking up otherwise working code inside of SharePoint, what he really means to say is "Eric screwed up my perfectly functional code by filling it up with server-side elements that we didn't need". Now you know the rest of the story...)

There'll be a whole lot more where that came from when we get all of our blogs moved over to the new MOSS site so stay tuned - and if you don't read Sean's blog already, you're missing out. Add it to the 'ol blogroll, pronto!