Discuz!NT官方社区

首页 » Discuz!NT交流与讨论 » 数据转换 » win2003,sql2005 datetime轉換成參數時發生錯誤
Mororo - 2008-1-3 23:25:00
相關信息如下:
--------------------------------------------------------------------------------

Conversion failed when converting datetime from character string.
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: System.Data.SqlClient.SqlException: Conversion failed when converting datetime from character string.

Source Error:


[No relevant source lines]


Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ab1743d1\3a6e410f\App_Web_0jemj35k.16.cs    Line: 0

Stack Trace:


[SqlException (0x80131904): Conversion failed when converting datetime from character string.]
  System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
  System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
  System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
  System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
  System.Data.SqlClient.SqlDataReader.HasMoreRows() +150
  System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) +212
  System.Data.SqlClient.SqlDataReader.Read() +9
  Discuz.Data.SqlServer.DataProvider.AddOnlineUser(OnlineUserInfo __onlineuserinfo, Int32 timeout) +794
  Discuz.Forum.OnlineUsers.Add(OnlineUserInfo __onlineuserinfo, Int32 timeout) +42
  Discuz.Forum.OnlineUsers.CreateGuestUser(Int32 timeout) +365
  Discuz.Forum.OnlineUsers.UpdateInfo(String passwordkey, Int32 timeout, Int32 uid, String passwd) +693
  Discuz.Forum.OnlineUsers.UpdateInfo(String passwordkey, Int32 timeout) +42
  Discuz.Web.UI.Pages.BasePage..ctor() +2130
  Discuz.ForumPage.forumindex..ctor() +82
  ASP.aspx_1_forumindex_aspx..ctor() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ab1743d1\3a6e410f\App_Web_0jemj35k.16.cs
  __ASP.FastObjectFactory_app_web_0jemj35k.Create_ASP_aspx_1_forumindex_aspx() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ab1743d1\3a6e410f\App_Web_0jemj35k.23.cs
  System.Web.Compilation.BuildResultCompiledType.CreateInstance() +49
  System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +115
  System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
  System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
  System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139
  System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +128
  System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +161

--------------------------------------------------------------------------------

望有能之士能提供出錯原因以及解決辦法,謝謝
戏水 - 2008-1-4 9:23:00
请问您是英文的win2003 , 英文的sql2005嘛?
Mororo - 2008-1-4 19:25:00
用的是繁体win2003和繁体sql2005
daizhj - 2008-1-7 10:27:00
这个问题我们正在本地进行测试,一但找出问题和解决方案马上修正.
同时感谢您对我们产品的支持和关注:)
雪人 - 2008-1-7 10:42:00
我们最近正在模拟楼主的环境来测试
havid - 2008-1-22 22:34:00
我也出现了同样的问题。。

我的繁体的WIN2003和英文的SQL2005,
我试过用SQL2000也同样会出错
havid - 2008-1-22 22:36:00
不知道现在这个问题解决了没有,如果已经解决,请告诉我,谢谢

我为这个问题忙了两天了:_onion12:
tylrw - 2008-1-24 11:52:00
我的也有问题:

我的中文win2003 ,原来选的时区是马来西亚,后来改过来的。
sql 2000
也出这个问题,无法解决。
凌豪 - 2008-4-8 14:39:00
现在是四月了,不知道找到了解决办法了没有,我也在急这个问题啊
toxxj - 2008-8-4 10:50:00
晕死,这个问题解决不了,我的程序是用不了,我的环境是 win2003 繁体版,sql2005 ,每次 登录,退出,都出现“從字元字串轉換到 datetime 時,轉換失敗”
1
查看完整版本: win2003,sql2005 datetime轉換成參數時發生錯誤