[Mono-bugs] [Bug 72416][Nor] New - The oracleclient parameter implementation does not implement different data types

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 9 Feb 2005 14:29:42 -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=72416

--- shadow/72416	2005-02-09 14:29:42.000000000 -0500
+++ shadow/72416.tmp.31020	2005-02-09 14:29:42.000000000 -0500
@@ -0,0 +1,53 @@
+Bug#: 72416
+Product: Mono: Class Libraries
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: Gentoo
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Data
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: eto@shaw.ca               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: The oracleclient parameter implementation does not implement different data types
+
+Description of Problem:
+
+The current implementation of the System.Data.OracleClient does not have 
+different data types for parameters, and binds everything as an NVarChar 
+type, and converts the value to a string.  This works for the most part, 
+but does not work for some data types, like DbType.Binary.
+
+Steps to reproduce the problem:
+1. Create a table in oracle with a column of type Raw.
+2. Enter some data in that table
+3. Try to use a parameter to search for that record using the Raw column.
+
+eg:
+
+byte[] bytes = ASCIIEncoding.Unicode.GetBytes(password);
+
+database.Provider.AddParameter(comm, "name", DbType.String, name); 
+database.Provider.AddParameter(comm, "password", DbType.Binary, bytes); 
+comm.CommandText = "select fKey from tsysUsers where fName=:name and 
+fPassword=:password";
+
+Actual Results:
+No results are ever found (because converting a byte[] array to a string 
+does not work as implemented)
+
+Expected Results:
+Should find results based on the value 
+
+How often does this happen? 
+Every Time
+
+Additional Information:
+All of the other data types should probably be accounted for.  I have 
+added a 'hack' to allow me to bind binary types for the time being, but 
+do not have enough time to look into doing it properly.