﻿<?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  » Business object mapper generated code contains error</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sun, 05 Apr 2026 14:42:22 GMT</lastBuildDate><ttl>20</ttl><item><title>Business object mapper generated code contains error</title><link>http://forum.strataframe.net/FindPost11890.aspx</link><description>A field in the database (SQL server) is&amp;nbsp;nvarchar(6),&amp;nbsp;not nullable, with a default value of ('')&amp;nbsp;Parenthesis-Singlequote-Singlequote-Parenthesis&amp;nbsp;.&lt;P&gt;If in the&amp;nbsp;Business object mapper NULL Value Option of&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;that&amp;nbsp;field is set to "Return alternate on null / Set null on alternate" with Null replacement value&amp;nbsp;defined as " " (quote-space-quote), the generated code&amp;nbsp;is missing the EndIf statement.&amp;nbsp;&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;Set&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; value &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; System.String)&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;If&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; value &amp;lt;&amp;gt; &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;" "&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;P&gt;Me&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;.CurrentRow.Item(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"ccodempv"&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;) = value&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;Me&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;.CurrentRow.Item(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"ccodempv"&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;) = DBNull.Value&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;End&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Set&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;A related but different problem appears when business object is saved if NULL Value Option is set instead to Return Alternate on Null:&amp;nbsp; In that case an error ocurrs because Strataframe apparently sends a&amp;nbsp;NULL to be saved, and Sql Server protests.&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Mon, 08 Oct 2007 10:52:02 GMT</pubDate><dc:creator>AlexSosa</dc:creator></item><item><title>RE: Business object mapper generated code contains error</title><link>http://forum.strataframe.net/FindPost11910.aspx</link><description>This has already been fixed and will be included in the next update.&amp;nbsp; You can get the beta DLLs at the following location:&lt;/P&gt;&lt;P&gt;&lt;A href="http://forum.strataframe.net/FindPost11844.aspx"&gt;http://forum.strataframe.net/FindPost11844.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(Be sure to copy out the second UI post after your download the first ZIP)</description><pubDate>Mon, 08 Oct 2007 10:52:02 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>