无法从字符串转换日期和/或时间

时间:2015-12-22 22:58:46

标签: asp.net sql-server

我的应用程序工作正常2个月,当它突然开始打印此错误时它没有在页面中告诉我或者我到底在哪里得到这个

  Erreur du serveur dans l'application '/'.
  Echec de la conversion de la date et/ou de l'heure à partir d'une chaîne de             caractères.

这是堆栈跟踪我绝对不知道从哪里开始寻找任何帮助是apreciated请

          [SqlException (0x80131904): Échec de la conversion de la date et/ou de l'heure à partir d'une chaîne de caractères.]
  System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +2418094
  System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception,   Boolean breakConnection, Action`1 wrapCloseInAction) +5694436
  System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +285
  System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +3731
  System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) +240
  System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) +268
  System.Data.SqlClient.SqlDataReader.Read() +34
  System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping) +211
  System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +197
  System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +410
  System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +218
  System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +136
  System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +86
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArgume nts arguments) +1494
  System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,    DataSourceViewSelectCallback callback) +22
  System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
  System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
  System.Web.UI.WebControls.GridView.DataBind() +9
  System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +114
  System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
  System.Web.UI.Control.EnsureChildControls() +92
  System.Web.UI.Control.PreRenderRecursiveInternal() +42
  System.Web.UI.Control.PreRenderRecursiveInternal() +160
  System.Web.UI.Control.PreRenderRecursiveInternal() +160
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,  Boolean includeStagesAfterAsyncPoint) +883

1 个答案:

答案 0 :(得分:0)

在web.config文件集文化和UI文化中使用全球化

请参阅此处的完整文档。

https://msdn.microsoft.com/en-us/library/bz9tc508.aspx