2002-08-15 Rodrigo Moya <rodrigo@ximian.com>
authorRodrigo Moya <rodrigo@mono-cvs.ximian.com>
Fri, 16 Aug 2002 01:35:51 +0000 (01:35 -0000)
committerRodrigo Moya <rodrigo@mono-cvs.ximian.com>
Fri, 16 Aug 2002 01:35:51 +0000 (01:35 -0000)
* System.Data.OleDb/OleDbCommand.cs (ExecuteReader): check values
for NULL before passing them to Marshal.PtrToStructure, which issues
an exception if the value is NULL.

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

mcs/class/System.Data/ChangeLog
mcs/class/System.Data/System.Data.OleDb/OleDbCommand.cs
mcs/class/System.Data/System.Data.OleDb/OleDbParameterCollection.cs
mcs/class/System.Data/System.Data.OleDb/libgda.cs

index b99a3ad1b30e97da7bf1dd3ca2dd07ff81a0e490..c8e859e6013e309b1436d05db4513b42dbc3dbdf 100644 (file)
@@ -1,3 +1,9 @@
+2002-08-15  Rodrigo Moya <rodrigo@ximian.com>
+
+       * System.Data.OleDb/OleDbCommand.cs (ExecuteReader): check values
+       for NULL before passing them to Marshal.PtrToStructure, which issues
+       an exception if the value is NULL.
+
 2002-08-15  Rodrigo Moya <rodrigo@ximian.com>
 
        * System.Data/UniqueConstraint.cs (UniqueConstraint): commented
index d5d304dd80ae1c653f6b8baf826dc07867e9fe48..dffde2cf33a639b9759395b16247962a22e49857 100644 (file)
@@ -279,6 +279,9 @@ namespace System.Data.OleDb
 
                                while (glist_node != null) {
                                        results.Add (glist_node.data);
+                                       if (glist_node.next == IntPtr.Zero)
+                                               break;
+
                                        glist_node = (GdaList) Marshal.PtrToStructure (glist_node.next,
                                                                                       typeof (GdaList));
                                }
index 5d566d83011b715124fa3578dfb6c45185744f03..8d09e465c16d2afb8ff5dd1fb5ee43308d6e5639 100644 (file)
@@ -67,16 +67,28 @@ namespace System.Data.OleDb
                        set { list[index] = value; }
                }
 
-               object IDataParameterCollection.this[string name] {
+               object IDataParameterCollection.this[string name]
+               {
                        [MonoTODO]
-                       get { throw new NotImplementedException (); }
+                       get {
+                               throw new NotImplementedException ();
+                       }
                        [MonoTODO]
-                       set { throw new NotImplementedException (); }
+                       set {
+                               throw new NotImplementedException ();
+                       }
                }
 
                internal IntPtr GdaParameterList {
                        [MonoTODO]
-                       get { throw new NotImplementedException (); }
+                       get {
+                               IntPtr param_list;
+
+                               param_list = libgda.gda_parameter_list_new ();
+                               // FIXME: add parameters to list
+                               
+                               return param_list;
+                       }
                }
 
                #endregion // Properties
index 17a1f163611dad67791de0383542b0493ac76b5e..8a9dc3dd70b0ecea4c5301e8f3704bf8d54493d3 100644 (file)
@@ -81,7 +81,10 @@ namespace System.Data.OleDb
 
                [DllImport("gda-2")]
                public static extern bool gda_value_get_boolean (IntPtr value);
-               
+
+               [DllImport("gda-2")]
+               public static extern IntPtr gda_parameter_list_new ();
+
                [DllImport("gda-2")]
                public static extern int gda_data_model_get_n_rows (IntPtr model);