[Mono-bugs] [Bug 74910][Nor] New - SybaseClient : Date Format Problem

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 11 May 2005 10:52: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 madeleine.roy@croesus.com.

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

--- shadow/74910	2005-05-11 10:52:33.000000000 -0400
+++ shadow/74910.tmp.25409	2005-05-11 10:52:33.000000000 -0400
@@ -0,0 +1,70 @@
+Bug#: 74910
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Data
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: madeleine.roy@croesus.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: SybaseClient : Date Format Problem
+
+Mono.Data.SybaseClient
+
+The date format conversion from my program date's format( English-Canda)
+to my database date's format (English - US) does not work 
+
+Steps to reproduce the problem:
+
+1. Set the database language to "English - CANADA"
+2. Set your program language to "English - US"
+3. Execute the following code
+
+using Mono.Data.SybaseClient;
+
+SybaseConnection	connection;
+SybaseCommand		command;
+
+
+string str = "Server={0};Database={1};User ID={2};Password={3};PACKET 
+SIZE=512;POOLING=true;MIN POOL SIZE=1;MAX POOL SIZE=100;CONNECTION 
+RESET=true";
+
+connection = new SybaseConnection(string.Format( 
+str, "server", "Database", "userID", "passord"));
+
+connection.Open();
+
+string request = "select * from B_NEWS where DATE > @DATE";
+
+command = new SybaseCommand( request, connection);
+
+DateTime date = new DateTime(2005, 04, 30);
+command.Parameters.Add("@DATE", 
+Mono.Data.SybaseClient.SybaseType.SmallDateTime).Value = date;
+try
+{
+   command.ExecuteNonQuery();
+}
+catch( Exception exception)
+{
+   Console.WriteLine(exception);
+   Console.Read();
+}
+connection.Close();
+
+
+
+Actual Results:
+ERROR : Arithmetic overflow during implicit conversion of VARCHAR 
+value '30/04/2005 12:00:00 AM' to a SMALLDATETIME field.
+
+Expected Results:
+No error