Business Object not recognizing type change


Author
Message
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
I have a BO which has a date field.  Previously, it was a SmallDateTime field in the database.  I started getting an error when trying to put a value of 01/01/1800 in it for a null, so I changed the type to be a DateTime to make it accept the value.  I rebuilt the partial BO, and recompiled.  I am still getting an exception saying that there is a SmallDateTime overflow exception.  I can put the 01/01/1800 date in if I do it directly through Query Analyzer, but when I do it through the BO it still thinks the field is a SmallDateTime for some reason.  It's like it isn't recognizing the type change, but all I see on the type in the BO code is System.DateTime.  Is there something I'm missing here or something I'm not doing?

The exception is coming from the SaveByForm routine in BusinessLayer.vb and it reads as follows:  SqlDbType.SmallDateTime overflow.  Value '01/01/1800 00:00:00' is out of range.  Must be between 1/1/1900 12:00:00 AM and 6/6/2079 11:59:59 PM.

Reply
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 think this may be a bug because it should be changing that back to DateTime if I rebuild the partial shouldn't it?

Hmmm...yes you are correct.  I will have to look into this.  If you remove that field descriptor class and rebuild the partial, does it show back up correctly?  Or, if you just change it to represent a DateTime and rebuild the partial does it leave it alone?  In either case, I am glad you found your problem.  I will look into this from a BO Mapper perspective.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Andria Jensen - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Andria Jensen - 18 Years Ago
StrataFrame Team - 18 Years Ago
Andria Jensen - 18 Years Ago
Andria Jensen - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Andria Jensen - 18 Years Ago
Andria Jensen - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Andria Jensen - 18 Years Ago
StrataFrame Team - 18 Years Ago
Andria Jensen - 18 Years Ago
StrataFrame Team - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search