[Mono-bugs] [Bug 66564][Nor] New - DateTime Conversion error if MS SQL DB uses "British English"

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 22 Sep 2004 07:13:33 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by crslinyc@hotmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=66564

--- shadow/66564	2004-09-22 07:13:33.000000000 -0400
+++ shadow/66564.tmp.9254	2004-09-22 07:13:33.000000000 -0400
@@ -0,0 +1,124 @@
+Bug#: 66564
+Product: Mono: Class Libraries
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: Fedora Core 1
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Data
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: crslinyc@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: DateTime Conversion error if MS SQL DB uses "British English"
+
+Description of Problem:
+
+With MS SQL if the default language for the login user is "British 
+English", then inserting DateTime values into the database causes the 
+program to crash.  Retrieving data only from the DB seems to be okay.
+
+Changing the default language for the user solves the problem.
+
+Possibly a similar error also occurs if System.IFormatProvider is used.
+
+
+Steps to reproduce the problem:
+1. Change default language for MS SQL database login used to "British 
+English"
+2. Try inserting datetime values into MS SQL database
+3. 
+
+Actual Results:
+Either the date inserted is incorrect (ie month and day of month 
+reversed), or the program crashes.  Sample stack trace:
+
+Description: Error processing request. 
+Error Message: HTTP 500. 
+
+Stack Trace: System.Data.SqlClient.SqlException: Error converting data 
+type varchar to datetime.
+in <0x0011b> System.Data.SqlClient.SqlConnection:ErrorHandler 
+(object,Mono.Data.Tds.Protocol.TdsInternalErrorMessageEventArgs)
+in <0x00069> (wrapper delegate-invoke) 
+System.MulticastDelegate:invoke_void_object_TdsInternalErrorMessageEventArg
+s (object,Mono.Data.Tds.Protocol.TdsInternalErrorMessageEventArgs)
+in <0x00031> Mono.Data.Tds.Protocol.Tds:OnTdsErrorMessage 
+(Mono.Data.Tds.Protocol.TdsInternalErrorMessageEventArgs)
+in <0x00056> (wrapper remoting-invoke-with-check) 
+Mono.Data.Tds.Protocol.Tds:OnTdsErrorMessage 
+(Mono.Data.Tds.Protocol.TdsInternalErrorMessageEventArgs)
+in <0x00276> Mono.Data.Tds.Protocol.Tds:ProcessMessage 
+(Mono.Data.Tds.Protocol.TdsPacketSubType)
+in <0x00052> (wrapper remoting-invoke-with-check) 
+Mono.Data.Tds.Protocol.Tds:ProcessMessage 
+(Mono.Data.Tds.Protocol.TdsPacketSubType)
+in <0x0015f> Mono.Data.Tds.Protocol.Tds:ProcessSubPacket ()
+in <0x00050> Mono.Data.Tds.Protocol.Tds:NextResult ()
+in <0x0005d> (wrapper remoting-invoke-with-check) 
+Mono.Data.Tds.Protocol.Tds:NextResult ()
+in <0x00011> Mono.Data.Tds.Protocol.Tds:SkipToEnd ()
+in <0x0004f> (wrapper remoting-invoke-with-check) 
+Mono.Data.Tds.Protocol.Tds:SkipToEnd ()
+in <0x000bb> Mono.Data.Tds.Protocol.Tds:ExecuteQuery (string,int,bool)
+in <0x00079> (wrapper remoting-invoke-with-check) 
+Mono.Data.Tds.Protocol.Tds:ExecuteQuery (string,int,bool)
+in <0x00098> Mono.Data.Tds.Protocol.Tds70:Execute 
+(string,Mono.Data.Tds.TdsMetaParameterCollection,int,bool)
+in <0x00361> System.Data.SqlClient.SqlCommand:Execute 
+(System.Data.CommandBehavior,bool)
+in <0x00067> (wrapper remoting-invoke-with-check) 
+System.Data.SqlClient.SqlCommand:Execute (System.Data.CommandBehavior,bool)
+in <0x0004b> System.Data.SqlClient.SqlCommand:ExecuteNonQuery ()
+in <0x00050> (wrapper remoting-invoke-with-check) 
+System.Data.SqlClient.SqlCommand:ExecuteNonQuery ()
+in <0x0009e> Microsoft.ApplicationBlocks.Data.SqlHelper:ExecuteNonQuery 
+(System.Data.SqlClient.SqlConnection,System.Data.CommandType,string,System.
+Data.SqlClient.SqlParameter[])
+in <0x00090> Microsoft.ApplicationBlocks.Data.SqlHelper:ExecuteNonQuery 
+(string,System.Data.CommandType,string,System.Data.SqlClient.SqlParameter
+[])
+in <0x00261> RicohAP.CommonCode.Code:AddSiteLog 
+(string,string,string,string)
+in <0x0012b> RicohAP.admin.view_user:DataGrid1_DeleteCommand 
+(object,System.Web.UI.WebControls.DataGridCommandEventArgs)
+in <0x00069> (wrapper delegate-invoke) 
+System.MulticastDelegate:invoke_void_object_DataGridCommandEventArgs 
+(object,System.Web.UI.WebControls.DataGridCommandEventArgs)
+in <0x0009e> System.Web.UI.WebControls.DataGrid:OnDeleteCommand 
+(System.Web.UI.WebControls.DataGridCommandEventArgs)
+in <0x00307> System.Web.UI.WebControls.DataGrid:OnBubbleEvent 
+(object,System.EventArgs)
+in <0x00032> System.Web.UI.Control:RaiseBubbleEvent 
+(object,System.EventArgs)
+in <0x0008f> System.Web.UI.WebControls.DataGridItem:OnBubbleEvent 
+(object,System.EventArgs)
+in <0x00032> System.Web.UI.Control:RaiseBubbleEvent 
+(object,System.EventArgs)
+in <0x000ae> System.Web.UI.WebControls.LinkButton:OnCommand 
+(System.Web.UI.WebControls.CommandEventArgs)
+in <0x000b5> 
+System.Web.UI.WebControls.LinkButton:System.Web.UI.IPostBackEventHandler.Ra
+isePostBackEvent (string)
+in <0x00016> System.Web.UI.Page:RaisePostBackEvent 
+(System.Web.UI.IPostBackEventHandler,string)
+in <0x00161> System.Web.UI.Page:RaisePostBackEvents ()
+in <0x002c3> System.Web.UI.Page:InternalProcessRequest ()
+in <0x000c2> System.Web.UI.Page:ProcessRequest (System.Web.HttpContext)
+in <0x002eb> ExecuteHandlerState:Execute ()
+in <0x00084> StateMachine:ExecuteState 
+(System.Web.HttpApplication/IStateHandler,bool&)
+
+
+
+Expected Results:
+correct change of database values
+
+How often does this happen? 
+always
+
+Additional Information: