[Mono-bugs] [Bug 73967][Nor] New - System.Data.OdbcDataReader.GetString() returns extra characters

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 22 Mar 2005 10:21:09 -0500 (EST)

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 dru@druware.com.


--- shadow/73967	2005-03-22 10:21:09.000000000 -0500
+++ shadow/73967.tmp.7847	2005-03-22 10:21:09.000000000 -0500
@@ -0,0 +1,49 @@
+Bug#: 73967
+Product: Mono: Class Libraries
+Version: 1.1
+OS: Mac OS X 10.3
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: Sys.Data
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: dru@druware.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: System.Data.OdbcDataReader.GetString() returns extra characters
+The System.Data.OdbcReader.GetString() implementation returns extraneous, non printable 
+Steps to reproduce the problem:
+1. Create a table with a column defined as char(5)
+2. Insert data into column that is only 3 char's long
+3. Query the Data, and attempt to execute a query using the resulting string 
+4. What the ODBC driver error with a syntax error on the data in the string.
+Actual Results:
+Thrown Error: Unclosed quotation mark before the character string 'AMD  ' (the value is 
+irrelevant, so long as it is less than the defined 5 chars).  This behavior is inconsistent with csc / 
+.NET behavior.
+Expected Results:
+A null padded string.  It appears that the Byte[] array is getting data that is not being correctly 
+converted. I suspect that this is due to the Encoding conversion of data, and is in the 
+OdbcDataReader.cs :: GetValue() method call.
+How often does this happen? 
+Every time
+Additional Information:
+Using Mono 1.1.4 on Mac OS X 10.3.8 as the test platform, MS SQL Server as the server, Actual 
+Technologies ODBC driver for SQL Server.  The driver has been validated using the same query 
+sequence in VBA under Excel.  The results where duplicated on Mono 1.1.4 on Suse Linux 9.1 
+using the FreeTDS ODBC driver.  Both results used the iODBC driver layer.