﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Issues  » Error in business object...</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 17:06:14 GMT</lastBuildDate><ttl>20</ttl><item><title>Error in business object...</title><link>http://forum.strataframe.net/FindPost950.aspx</link><description>I'm getting an error in my business object when I try to run my app.  I can understand what the debugger is telling me is wrong, but what I'm not sure of is how to fix it.  The problem is I have a date field that contans nulls... that is the field will only contain a date when it is applicable.  Most other times it will be empty.  I'm including a screenshot of the error.&lt;br&gt;
&lt;br&gt;
Thanks</description><pubDate>Wed, 26 Apr 2006 22:42:28 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Error in business object...</title><link>http://forum.strataframe.net/FindPost970.aspx</link><description>I'm glad that you found the answer.&amp;nbsp; But I understand that sometimes it's nice to have confirmation as well :D.&amp;nbsp;</description><pubDate>Wed, 26 Apr 2006 22:42:28 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Error in business object...</title><link>http://forum.strataframe.net/FindPost955.aspx</link><description>Trent, thanks for the response. I figured this one out by myself but since I am new to StrataFrame I wanted an "Official" answer. ;) I ended up choosing "Use Nullable Generic" and it seems to work fine for now.</description><pubDate>Wed, 26 Apr 2006 13:44:30 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Error in business object...</title><link>http://forum.strataframe.net/FindPost952.aspx</link><description>Mike,&lt;/P&gt;&lt;P&gt;You need to return some type of alternate value when you have a field that will support NULL values, this way you can avoid this error.&amp;nbsp; You can use a nullable generic or just returned a specified value when the value is DBNull.&amp;nbsp; To do this you will need to do the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Open up the BO Mapper and navigate to your business object.&amp;nbsp;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Select the DeferredTo field and click "Customize."&amp;nbsp; This will bring up the Custom Field Properties.&amp;nbsp;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Under NULL Value Support, select "Use Nullable Generic" and then click OK.&amp;nbsp;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Rebuild your partial class by using the Context Menu on the one BO that you just modified or click the "Rebuild All" button.&amp;nbsp;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Run your application and the error should be gone.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;You could also return an alternate value by selecting the "Return Alternate On Null" and then setting the "Null Replacement" value to #01/01/1800#&lt;/P&gt;&lt;P&gt;FYI:&amp;nbsp; All StrataFrame controls will respect #01/01/1800# as a NULL value so you can clear out the contents of a DateTime field by setting the ClearOnNull property.&amp;nbsp; If you do not want to use 01/01/1800 as the null date, you can set it to whatever you like and then set the NullDateValue property on the DateTimePicker to the date you prefer to use a "null".&lt;/P&gt;&lt;P&gt;Hope this helps. :)</description><pubDate>Wed, 26 Apr 2006 13:21:57 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>