SQL Date conversion error after upgrading

Topics: Installing BugNET
Jan 8, 2013 at 3:14 PM

Upgraded to 1.2.231.0.  All upgrade scripts seemed to run fine.

Now when homepage loads I get:

 

"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. "

 

This occurs in SqlDataProviderListHelpers.GenerateIssueListFromReader at the line:

 

while (returnData.Read())

 

This error comes from SQL server.  This would suggest a problem in parsing a date (obviously) so I ran the SQL command from SSMS:

 

SELECT * 
FROM BugNet_IssuesView iv 
INNER JOIN BugNet_P6_CFV cf ON cf.IssueId = iv.IssueId AND cf.ProjectId = iv.ProjectId 
WHERE iv.[ProjectId] = 6   
	and iv.[IsClosed] = 0 
	and iv.[Disabled] = 0 
ORDER BY iv.[IssueId] 

No errors whatsoever, runs fine.

The views have CONVERT and CAST statements converting text to dates, but these fields all appear to be datetime anyway?  I am guessing this is where the error is, but I would expect SQL server to barf when I ran it in SSMS as well.

If I skip over this section of code the site loads fine (ableit with no issues listed)

 

Jan 8, 2013 at 3:18 PM

In the meantime, taking the two date conversion functions out of the BugNet_IssuesView has solved the problem.

Is this an oversight (bug?) in the upgrade process or is this intentional?  I can't for the life of me see why it would be intentional if the columns are already datetime?