Quellcode durchsuchen

2004-07-28 Umadevi S ([email protected])
* OdbcParameter.cs - fixed bug 61968. String values passed with quotes

svn path=/trunk/mcs/; revision=31534

Umadevi S vor 21 Jahren
Ursprung
Commit
ca6eab23b1

+ 4 - 0
mcs/class/System.Data/System.Data.Odbc/ChangeLog

@@ -1,3 +1,7 @@
+2004-07-28 Umadevi S ([email protected])
+        * OdbcParameter.cs - fixed bug 61968. String values passed with quotes
+                                                                                                 
+
 2004-07-07 Umadevi S ([email protected])
         * OdbcConnection.cs - Allowed Close to be called multiple times
                             - Implementation of Dispose method

+ 4 - 1
mcs/class/System.Data/System.Data.Odbc/OdbcParameter.cs

@@ -261,7 +261,10 @@ namespace System.Data.Odbc
 				string paramValueString = ParamValue.ToString();
 				// Treat everything else as a string
 				// Init string buffer
-				if (buffer == null || buffer.Length < ((size > 20) ? size : 20))
+				 if (ParamValue is String)
+                                        paramValueString = "\'"+paramValueString+"\'";
+                                 
+				 if (buffer == null || buffer.Length < ((size > 20) ? size : 20))
 					buffer = new byte[(size > 20) ? size : 20];
 				else
 					buffer.Initialize();