﻿<?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 » Business Objects and Data Access (How do I?)  » Allow null value 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 12:55:36 GMT</lastBuildDate><ttl>20</ttl><item><title>Allow null value in business object</title><link>http://forum.strataframe.net/FindPost1829.aspx</link><description>Some of the fields in my table allow null value. Especially for datetime and decimal field. I want the default value of the controls, which mapped to&amp;nbsp;these fields is null string ("") during initialization&amp;nbsp;of add&amp;nbsp;new record screen. How can I customize the fields in business object mapper&amp;nbsp;so that the default value can be null string?</description><pubDate>Thu, 13 Jul 2006 08:43:04 GMT</pubDate><dc:creator>Wang Tong Yin</dc:creator></item><item><title>RE: Allow null value in business object</title><link>http://forum.strataframe.net/FindPost1832.aspx</link><description>When a new record it added, the business object automatically initializes the values within the new row to remove any DBNull.Value values.&amp;nbsp; To prevent this, and allow all of the fields within the new row to be NULL, set the AllowNullValuesOnNewRow property on the business object to True.&lt;/P&gt;&lt;P&gt;If you only want a few fields to have NULL values, then in the SetDefaultValues event handler, add this code:&lt;/P&gt;&lt;P&gt;Me.CurrentRow("fieldname") = DBNull.Value&lt;/P&gt;&lt;P&gt;Add that for each field you want to initialize as a null value, and you'll be good to go.</description><pubDate>Thu, 13 Jul 2006 08:43:04 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>