Odd Date Behavior...


Author
Message
StarkMike
StarkMike
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Forum Members
Posts: 436, Visits: 944
I used to use #1/1/1800# as my null date replacement. I've since removed this from the BO Mapper and rebuilt all my BOs. However when I create a new record through my form 1/1/1900 still pops up... any idea why?
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
It is possible that the date that was previously serialized within the forms designer for the date time picker.  If you select the control within the form designer, what is the date set to?
StarkMike
StarkMike
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Forum Members
Posts: 436, Visits: 944
Ok, so I'm still trying to figure this one out. Here's what I did.



I created a new table in SQL Server with just one field. A smalldatetime field set to Allow Nulls but no default value.



I created a new StrataFrame project and a new project inside the BO Mapper. I created a new BO and bound it to the new table I created. No customizations on the field.



I dropped the new BO on the form and a BBS. I bound a native DatagridView to the BBS which was bound to the BO. I created only one fill method :



Public Sub Fill()

Try

Me.FillDataTable("SELECT * FROM Table_1")



Catch ex As Exception



End Try





And yet when I add a new record using the grid there is still a default value of 1/1/1900 inserted. I have no idea where it comes from.



On the other hand I created a pure .NET app using native .NET data sources and when I added a record it didnt insert 1/1/1900. I'm stumped. I'm including a screenshot of my native .NET app in case you have questions about how I setup this project.
Attachments
CropperCapture[22].Jpg (86 views, 38.00 KB)
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
I'm stumped.

Me too Smile  We do not use 1/1/1900 as a default anywhere.  But I believe, so don't be discouraged Smile  .... however :errm: I cannot reproduce your behavior.  I just followed your steps from above and when I create a new row, it appears as 1/1/1800.

I think that is the first mystery that we need to resolve.  I think that if we clear that up then the rest is downhill.  Smile

StarkMike
StarkMike
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Forum Members
Posts: 436, Visits: 944
I agree that if you solve the mystery of 1/1/1800, 1/1/1900 will solve itself.

Here are a couple of links that may or may not help. I havent had too much time to study it, but it sounds like it may be a SQL Server issue.

http://www.codescene.com/2006/01/party_like_its_111900_or_how_t.php

http://www.dotnet247.com/247reference/msgs/15/79000.aspx

I appreciate all the help. ;-)

StarkMike
StarkMike
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Forum Members
Posts: 436, Visits: 944
Any progress on this? Cool
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Actually I did not know you were waiting on me.  I thought you were going to look into the dates on your side.  This should not have anything to do with SF, but if you can give me a sample that reproduces the behavior I will look at it.  I am curious. Smile
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