How can I allow null values to be saved?


Author
Message
Peter Jones
Peter Jones
Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi,

I have string field that is nullable in the database. In my BO I have AllowNullValuesOnNewRow set to True. In the BO Custom Field Properties I have Return Alternate on Null with the value being String.Empty. When a new row is created I don't set a default value for this field.

Ok - now here's the problem. When I create a new row and don't touch that field a Null is saved to the database (good). However, if I put something in that field and then blank it out then "" (empty string) is saved to the database (bad).

If I have an existing record with a value in the field and I blank it out it is also saved as an empty string when, in fact, I really want it saved as a Null.

Try as I may I just can't find the magic settings to achieve nulls. How do I go about saving null values instead of empty strings.

Cheers, Peter

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