[Mono-bugs] [Bug 72472][Maj] New - Cannot get length of a blob/clob from DataReader.GetBytes

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 10 Feb 2005 19:40:32 -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 eto@shaw.ca.

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

--- shadow/72472	2005-02-10 19:40:32.000000000 -0500
+++ shadow/72472.tmp.23703	2005-02-10 19:40:32.000000000 -0500
@@ -0,0 +1,51 @@
+Bug#: 72472
+Product: Mono: Class Libraries
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: Gentoo
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Sys.Data
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: eto@shaw.ca               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Cannot get length of a blob/clob from DataReader.GetBytes
+
+Description of Problem:
+When getting a large amount of data, the convention is to call 
+DataReader.GetBytes(field, 0, null, 0, 0) to get the size of the data 
+before getting any actual data.  This cannot currently be done (causes a 
+crash)
+
+
+Steps to reproduce the problem:
+1. Connect to an oracle database with a CLOB/BLOB field 
+2. Do a search using a OracleCommand and set it's CommandBehavior to 
+SequentialAccess
+3. call DataReader.GetBytes(<blob/clob column>, 0, null, 0, 0); to get 
+the total size of the data
+
+Actual Results:
+
+Crashes with the following:
+System.ArgumentNullException: Argument cannot be null.
+Parameter name: destinationArray
+in <0x00435> System.Array:Copy (System.Array,int,System.Array,int,int)
+in <0x000a4> System.Data.OracleClient.OracleDataReader:GetBytes 
+(int,long,byte[],int,int)
+.. etc
+
+
+Expected Results:
+Returns the entire lenth of the data in the database for that field
+
+How often does this happen? 
+Every Time
+
+
+Additional Information: