Newbie question: Null DateTime Fields


Author
Message
Ben Kim
Ben Kim
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 99, Visits: 253
Hello,

I am throwing together a proof-of-concept application using StrataFrame.  We have several fields in our SQL datatables that allow null's (in fact most of them).  

Say I have a birthdate field in a personmaster table.   If the value is null, the bo throws an exception when I navigate to the record.  I have tried setting the alternate value on null to several things such as System.DBNull and System.DBNull.Value etc.  However it will not compile.

How does everyone else handle null values in their BO's especially datetime type fields?

Thanks!

Ben, Emergitech

Replies
Ben Kim
Ben Kim
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 99, Visits: 253
Thank you.  Did as you said, now the datetimepicker control shows blank on Null fields!  Awesome.  But (there is always that huh?) I now have a new issue since doing this. I have defined a master->detail form.  The Birthdate field which I was having issues with is defined in the parent BO.   Now since added the #1/1/1800# code to the BO, the Save/Undo buttons enable themselves whenever I navigate to a table entry that has a blank birthdate!  Ideas???
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I don't think the two are related.  A BO field has no control of the editing state of a BO.  The MaintenanceFormToolstrip follows the EditingState of the business object.  I would look for other things that may have changed.

The editing state is controled off of the EditingState of the BO which is changed from the Add(), Edit(), Save(), and Undo() of a BO or form. 

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Ben,

We fixed a bug the other day that was affecting the IsDirty of the BO which will effect the Save and Undo buttons when refreshed.  This has been fixed and will be posted in the next update.  If this is keeping you from moving forward then we can give you a temporary fix, but if you are just on eval mode then this may not be an issue and you can just get a fix on the next update.

Ben Kim
Ben Kim
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 99, Visits: 253
Wonderful.  I can wait for the fix since I am just evaluating and creating a POC application.  I thought I was doing something wrong.  Glad to hear you have a fix for it.
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Just so it makes a little sense....we enhanced the DateTimePicker in the last update which introduced the minor issue...as luck would have it, you ran into the obscure requirements for this to happen Smile  At any rate, you can get it in your next update and it will resolve itself.
Ben Kim
Ben Kim
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 99, Visits: 253
Lucky me! BigGrin  On a lighter note, thank you for developing such a wonderful framework!   Did you guys ever give Clarion a peek?  It does a lot of what you are accomplishing with StrataFrame and more.  However, the company that develops the language has lagged behind in technology over the years and the company I work for has had enough...which is the reason why we are moving to .NET.

If you want a RDC/VNC/PCAnywhere demo of the product, please let me know.  I would be more than happy to show you the power of Clarion so you can replicate it <grin>.

Ben

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
We think we are familiar with our competitors but are always willing to learn more. I appreciate your input and compliements and we look forward to working with you.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Ben Kim - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Ben Kim - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Ben Kim - 19 Years Ago
                         I don't think the two are related. A BO field has no control of the...
Trent L. Taylor - 19 Years Ago
                             Ben, We fixed a bug the other day that was affecting the IsDirty of...
Trent L. Taylor - 19 Years Ago
                                 Wonderful. I can wait for the fix since I am just evaluating and...
Ben Kim - 19 Years Ago
                                     Just so it makes a little sense....we enhanced the DateTimePicker in...
Trent L. Taylor - 19 Years Ago
                                         Lucky me! :D On a lighter note, thank you for developing such a...
Ben Kim - 19 Years Ago
                                             We think we are familiar with our competitors but are always willing...
Trent L. Taylor - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search