SetData: The conversion of a char data type to a datetime data...

Expand / Collapse
 

SetData: The conversion of a char data type to a datetime data...


SYMPTOM

I get the following error message when the chart is run.

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

CAUSE

This is caused by the date format returned by the database not using the same culture formatting as the website.

SOLUTION

To solve this problem, the correct database culture must be specified.

[C#]

Chart.DatabaseCultureName = "en-GB";
// Or is using the DataEngine
myDataEngine.DatabaseCultureName = "en-GB";
 

 
[Visual Basic]

Chart.DatabaseCultureName = "en-GB"
' Or is using the DataEngine
myDataEngine.DatabaseCultureName = "en-GB"
 

For a list of culture names, please see this page.



Rate this Article:
     

Add Your Comments


Comment require login or registration.

Details
Last Modified:Thursday, June 5, 2008
Last Modified By: Support
Type: ERRMSG
Rated 2 stars based on 29 votes.
Article has been viewed 38,092 times.
Options