Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...4.8 FillObject bug4.8 FillObject bug
Previous
 
Next
New Post
1/4/2008 6:23 AM
 

DotNetNuke.Common.Utilities.CBO.FillObject causes an exception with nullable fields.

In my case the HydrateObject() method tried to convert an Int to Int? on line 205 in CBO.vb. This causes an exception Invalid cast from 'System.Int32' to 'System.Nullable`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'.

This is a known bug in the 2.0 framework http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=93465

http://weblogs.asp.net/pjohnson/archive/2006/02/07/437631.aspx

 
New Post
1/4/2008 8:47 AM
 


Alex Shirley


 
New Post
1/15/2008 5:03 AM
 

Hi,

I'm experiencing the same problem.

  1. It's not really clear if this a DNN/ASP.NET bug that will be fixed in 4.8.1 or that I need to adapt my module code?
  2. And if I need to adapt my code, how should that be done?

Thanks!

 
New Post
1/16/2008 12:32 PM
 

It sounds like this is something that the core team will address...

As for a work around, you would most likely need to implement your own hydration methods to deal with the values.  You could use iHydratable to your advantage in this case.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
2/8/2008 11:51 AM
 

It is important to realise that the CBO class is not designed to handle every use case.

Mitchell's answer is the best solution.  If CBO does not work for you then implement IHydratable, which gives you full control over the hydration.


Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...4.8 FillObject bug4.8 FillObject bug


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out