Date format problems

Last post 04-13-2005, 6:27 PM by rws_procopia. 6 replies.
Sort Posts: Previous Next
  •  04-13-2005, 6:43 AM 5668

    Date format problems

    Hi,

    I have been testing an integration of CuteChat v2 recently (which on the whole has gone well) and come up againast a Date format issue. After reading the archives it is stated that this issue has been resolved but even using the latest files I still encounter issues.

    When connecting to the chatroom I get the following exception:

    server side System.Data.SqlClient.SqlException:
    System.Data.SqlClient.SqlException: Arithmetic overflow error converting expression to data type datetime.
    The statement has been terminated.
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
    at System.Data.SqlClient.SqlCommand.ExecuteReader()
    at CuteSoft.Chat.CDQ.Providers.SqlClient.SqlClientQueryProvider.AdvancedExecute(String commandText, Object[] args)
    at CuteSoft.Chat.CDQ.QueryService.ExecuteDataReader(String commandText, Object[] parameters)
    at CuteSoft.Chat.CDQ.QueryService.ExecuteNonQuery(String commandText, Object[] parameters)
    at QueryService_InsertDataItem_437353a5.ExecuteCodeInternal()
    at CuteSoft.Chat.CDQ.CodeQueryService.ExecuteCode(QueryCommand cmd)
    at CuteSoft.Chat.CDQ.QueryCommand.a(QueryMethodImplementCode A_0)
    at CuteSoft.Chat.CDQ.QueryCommand.b()
    at CuteSoft.Chat.CDQ.QueryCommand.Execute()
    at ICuteChatDataAccessImplementation.CuteSoft.Chat.ICuteChatDataAccess.InsertDataItem(IDataItem item)
    at aj.b(Chat_Message A_0)
    at aj.a(Guid A_0, UserIdentity A_1, Guid A_2)
    at e.g()
    at e.DoSync(ChannelRequest syncRequest)
    at CuteSoft.Chat.ChatApi.CHSync(ChannelRequest request)
    at CuteSoft.Chat.DynamicAssembly.ServiceLayerChatApiDecoratorProxy.CHSync_InterceptedCall(ChannelRequest request)
    at CuteSoft.Chat.DynamicAssembly.WebLayerChatApiDecoratorProxy.CHSync_InterceptedCall(ChannelRequest request)
    at CuteSoft.Chat.ChatRaneService.CHSync(ChannelRequest request)

    This occurs when the Database has British English Date culture set - if I set the culture to us-english then the problem disappears. Unfortunately I cannot do this on the live server so I am wondering if this can be fixed - or perhaps I have downloaded the wrong files... I am using the  latest standalone version at the moment as I have integrated the login entry system  with our own setup, which coincidentally worked well.

    Kind regards

    Richard Stockley




  •  04-13-2005, 9:22 AM 5675 in reply to 5668

    Re: Date format problems

    Richard Stockley :
     
    Could you download and test it again ?

    Off cause you could use the SQL Server Profiler to see what the cutechat executed
     
    Regards , Terry .
  •  04-13-2005, 10:31 AM 5682 in reply to 5675

    Re: Date format problems

    Thanks for the swift reply,

    I have downloaded the standalone version again and tested it for you - same result I'm afraid. I assume the vital file to update is the CuteSoft.Chat assembly - I am now using a version time stamped 05/04 22:28 v2.0.0.0

    I have got a workaround now as I have been able to add a new user onto the production server which has its default language set to english (As opposed to british), this cures the problems I am seeing but for the record I did investigate a bit more for you:

    When profiling the issue I get the following SQL which causes issues:

    exec sp_executesql N'INSERT [Chat_Message] ([MessageTime],[ChannelId],[ChannelType],[ActionTime],[Location],[MessageType],[DetailsType],[DetailsReason],[TargetUserId],[TargetDisplayName],[TargetDeleted],[SenderUserId],[SenderDisplayName],[SenderDeleted],[Whisper],[Bold],[Italic],[Underline],[ForeColor],[FontName],[FontSize],[MessageText],[MessageHtml],[Info1],[Info2],[Info3],[Info4],[Info5],[InfoXml]) VALUES (CONVERT(DATETIME,@cdq_1),@cdq_2,@cdq_3,CONVERT(DATETIME,@cdq_4),@cdq_5,@cdq_6,@cdq_7,@cdq_8,@cdq_9,@cdq_10,@cdq_11,@cdq_12,@cdq_13,@cdq_14,@cdq_15,@cdq_16,@cdq_17,@cdq_18,@cdq_19,@cdq_20,@cdq_21,@cdq_22,@cdq_23,@cdq_24,@cdq_25,@cdq_26,@cdq_27,@cdq_28,@cdq_29)', N'@cdq_0 nvarchar(50),@cdq_1 nvarchar(50),@cdq_2 uniqueidentifier,@cdq_3 nvarchar(4000),@cdq_4 nvarchar(50),@cdq_5 nvarchar(4000),@cdq_6 nvarchar(4000),@cdq_7 nvarchar(4000),@cdq_8 nvarchar(50),@cdq_9 nvarchar(50),@cdq_10 nvarchar(50),@cdq_11 bit,@cdq_12 nvarchar(50),@cdq_13 nvarchar(50),@cdq_14 bit,@cdq_15 nvarchar(50),@cdq_16 nvarchar(50),@cdq_17 nvarchar(50),@cdq_18 nvarchar(50),@cdq_19 nvarchar(50),@cdq_20 nvarchar(50),@cdq_21 nvarchar(50),@cdq_22 nvarchar(50),@cdq_23 nvarchar(50),@cdq_24 nvarchar(50),@cdq_25 nvarchar(50),@cdq_26 nvarchar(50),@cdq_27 nvarchar(50),@cdq_28 nvarchar(50),@cdq_29 nvarchar(4000)', @cdq_0 = NULL, @cdq_1 = N'2005-04-13 15:24:15.625', @cdq_2 = 'EF47230F-882D-4D3A-B31E-7E20731B1E2E', @cdq_3 = N'Lobby', @cdq_4 = N'2005-04-13 15:24:15.625', @cdq_5 = N'Channel', @cdq_6 = N'Event', @cdq_7 = N'AddActiveOnline', @cdq_8 = NULL, @cdq_9 = NULL, @cdq_10 = NULL, @cdq_11 = 0, @cdq_12 = NULL, @cdq_13 = NULL, @cdq_14 = 0, @cdq_15 = NULL, @cdq_16 = NULL, @cdq_17 = NULL, @cdq_18 = NULL, @cdq_19 = NULL, @cdq_20 = NULL, @cdq_21 = NULL, @cdq_22 = NULL, @cdq_23 = NULL, @cdq_24 = NULL, @cdq_25 = NULL, @cdq_26 = NULL, @cdq_27 = NULL, @cdq_28 = NULL, @cdq_29 = N'<DataItem Type="CuteSoft.Chat.Chat_Active_Online"><Column Name="ChannelId" Value="ef47230f-882d-4d3a-b31e-7e20731b1e2e" /><Column Name="OnlineId" Value="13" /><Column Name="ClientId" Value="761d6d3a-a119-4598-ab9f-b53532911c88" /><Column Name="UserId" Value="13" /><Column Name="DisplayName" Value="al04" /><Column Name="IPAddress" Value="127.0.0.1" /><Column Name="BeginTime" Value="632490026556093750" /><Column Name="ActiveTime" Value="632490026556093750" /><Column Name="MessageTime" Value="632490026556093750" /><Column Name="OnlineStatus" Value="Online" /><Column Name="UserType" Value="NotSet" /><Column Name="Avatar" Value="administrators_default.gif" /><Column Name="TypingTime" /><Column Name="BlockedList" Value="" /></DataItem>'

    Hope this is enough detail for you. I do have a couple of other issues but I will post them separately.

  •  04-13-2005, 11:42 AM 5685 in reply to 5682

    Re: Date format problems

    Oh ,
     
    It seems that we put the wrong version to the web .

    CONVERT(DATETIME,@cdq_1)
    @cdq_1 = N'2005-04-13 15:24:15.625'
    is wrong .

    We will update it as soon as possible . 
    Regards , Terry .
  •  04-13-2005, 12:49 PM 5687 in reply to 5685

    Re: Date format problems

    rws_procopia,
     
    We have updated the control.
     
     
    Keep us posted.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  04-13-2005, 1:24 PM 5689

    Re: Date format problems

    We have updated the control.
     
     
    Keep us posted.
     
    Regards , Terry .
  •  04-13-2005, 6:27 PM 5705 in reply to 5689

    Re: Date format problems

    Hi,

    Many thanks - the second update seems to have done the trick. I can now use the chat system with Britsh local settings in MSSql

    Very impressed at the resolution time, unfortunately I have a few more issues to still resolve but will leave that until tomorrow.

    Once again thanks

    regards

    Richard Stockley

View as RSS news feed in XML