Skip to content

Commit

Permalink
2002-08-15 Rodrigo Moya <rodrigo@ximian.com>
Browse files Browse the repository at this point in the history
	* 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
  • Loading branch information
Rodrigo Moya committed Aug 16, 2002
1 parent 58da214 commit 6a793a7
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
6 changes: 6 additions & 0 deletions mcs/class/System.Data/ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions mcs/class/System.Data/System.Data.OleDb/OleDbCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ public OleDbDataReader ExecuteReader (CommandBehavior behavior)

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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,28 @@ object IList.this[int index] {
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
Expand Down
5 changes: 4 additions & 1 deletion mcs/class/System.Data/System.Data.OleDb/libgda.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ public static IntPtr GdaClient

[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);

Expand Down

0 comments on commit 6a793a7

Please sign in to comment.