Server Error in '/' Application.

Unable to convert MySQL date/time value to System.DateTime

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: MySql.Data.Types.MySqlConversionException: Unable to convert MySQL date/time value to System.DateTime

Source Error:


Line 155:          litOther.Text = "<h3 style=\"padding-top:20px;\">Andra boendeformer i " + destinationCity + "</h3>" + othertypes;
Line 156:
Line 157:        foreach (DataRow row in HotelDB.GetEanCityCenter(regionid).Rows)
Line 158:        {
Line 159:          lat = row["centerlatitude"].ToString().Replace(",", ".");

Source File: c:\proj\allahotell.live2\hoteldestination.aspx.cs    Line: 157

Stack Trace:


[MySqlConversionException: Unable to convert MySQL date/time value to System.DateTime]
   MySql.Data.Types.MySqlDateTime.GetDateTime() +228
   MySql.Data.MySqlClient.MySqlDataReader.GetValue(Int32 i) +397
   MySql.Data.MySqlClient.MySqlDataReader.GetValues(Object[] values) +74
   System.Data.ProviderBase.SchemaMapping.LoadDataRow() +43
   System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping) +135
   System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +219
   System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +420
   System.Data.DataTable.Load(IDataReader reader, LoadOption loadOption, FillErrorEventHandler errorHandler) +251
   ParserDll.HotelDB.GetEanCityCenter(Int32 regionid) +477
   hoteldestination.Page_Load(Object sender, EventArgs e) in c:\proj\allahotell.live2\hoteldestination.aspx.cs:157
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4330.0