StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
Business Objects and Data Access (How do I?)
»
Handling null value
Handling null value
Post Reply
Like
0
Handling null value
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Chan
Chan
posted 17 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 533,
Visits: 2K
Hi,
I have a table with 3 fields
Field Name Type ALlow NULL PK Indentity
---------------------------------------------------------------------
ID int No Yes Yes
Descr varchar(30) No No No
FKID int Yes No No
I set my BO to map to this table, set ID and Descr to Do Not Allow NULL; FKID to Use nullable generic in BO mapper allow null option. When I save new record, I found that FKID is always ZERO instead of NULL if I leave FKID blank (bound in combobox). I figured out that myBO.AllowNullValuesOnNewRow = false.
So, I try to set myBO.AllowNullValuesOnNewRow = true but then I will hit error complaint that system unable to convert DBNull to string for textbox. I was thinking to change "Descr" to use "Return alternate on null" option.
May I know is it the prefered way? Or, any recommendation?
Thank you
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
Handling null value
Chan
-
17 Years Ago
Strings do not support a nullable generic. You will have to use the...
Trent L. Taylor
-
17 Years Ago
Hi, I think that is better change the code generate to, like it :...
Alexnaldo C Santos
-
17 Years Ago
The CurrentRow property is a DataRow object reference, not a wrapper...
StrataFrame Team
-
17 Years Ago
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search