StrataFrame Forum

Business object mapper generated code contains error

http://forum.strataframe.net/Topic11890.aspx

By AlexSosa - 10/5/2007

A field in the database (SQL server) is nvarchar(6), not nullable, with a default value of ('') Parenthesis-Singlequote-Singlequote-Parenthesis .

If in the Business object mapper NULL Value Option of that field is set to "Return alternate on null / Set null on alternate" with Null replacement value defined as " " (quote-space-quote), the generated code is missing the EndIf statement. 

Set(ByVal value As System.String)

If value <> " " Then

Me.CurrentRow.Item("ccodempv") = value

Else

Me.CurrentRow.Item("ccodempv") = DBNull.Value

End Set

A related but different problem appears when business object is saved if NULL Value Option is set instead to Return Alternate on Null:  In that case an error ocurrs because Strataframe apparently sends a NULL to be saved, and Sql Server protests.

By Trent L. Taylor - 10/8/2007

This has already been fixed and will be included in the next update.  You can get the beta DLLs at the following location:

http://forum.strataframe.net/FindPost11844.aspx

(Be sure to copy out the second UI post after your download the first ZIP)