Business object mapper generated code contains error


Author
Message
AlexSosa
AlexSosa
StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)
Group: Forum Members
Posts: 35, Visits: 138
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.


Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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)

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search