[Mono-bugs] [Bug 38143][Nor] New - Problem using IDataParameterCollection
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Sat, 15 Feb 2003 08:49:19 -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 carlosga@telefonica.net.
http://bugzilla.ximian.com/show_bug.cgi?id=38143
--- shadow/38143 Sat Feb 15 08:49:19 2003
+++ shadow/38143.tmp.9775 Sat Feb 15 08:49:19 2003
@@ -0,0 +1,67 @@
+Bug#: 38143
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details: Red Hat 8
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: carlosga@telefonica.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Problem using IDataParameterCollection
+
+Hello:
+
+
+I'm having problems trying to use IDbCommand.Parameters property, here is
+the test case:
+
+using System;
+using System.Data;
+
+
+namespace DataPatameterTest
+{
+ public class Test
+ {
+ static void Main(string[] args)
+ {
+ IDbCommand command = null;
+
+ command.Parameters.Add(GetParameter("param01"));
+
+ Console.WriteLine(((IDataParameter)command.Parameters[0]).Value);
+ }
+
+
+ public static IDataParameter GetParameter(string name)
+ {
+ return null;
+ }
+ }
+}
+
+
+This builds well in Windows using csc but using mcs in Linux gives the next
+message:
+
+ParameterTest.cs(15) error CS1502: The best overloaded match for method
+'object System.Data.IDataParameterCollection.get_Item (string)' has some
+invalid arguments
+ParameterTest.cs(15) error CS1503: Argument 1: Cannot convert from 'int' to
+'string'
+ParameterTest.cs(15) error CS1501: No Overload for method `this' takes `1'
+arguments
+Compilation failed: 3 error(s), 0 warnings
+
+
+
+Best regards
+Carlos Guzmán Álvarez
+Vigo-Spain