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: 6.9K
Have you tried turing on the DAL debugger to see the update command?  In the AppMain you can set the debug mode for the data source:

Databasics.DataSources(0).SetDebugOn("C:\MyDebug.html",True)

You can then review the debug information to see if there is anything that gives you a clue.  The error is more than likely coming from the SQL side rather than within the BO or DAL.

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