+2002-08-18 Rodrigo Moya <rodrigo@ximian.com>
+
+ * System.Data.OleDb/OleDbDataReader.cs (this[]): made it just call
+ GetValue, which will take care of all the work needed.
+ (Close): implemented basic stuff.
+ (~OleDbDataReader): implemented.
+
+ * System.Data.OleDb/libgda.cs: added more needed functions.
+
2002-08-16 Rodrigo Moya <rodrigo@ximian.com>
* System.Data.OleDb/TestOleDb.cs: made it work with a temporary table
public object this[int index] {
get {
- if (currentResult < 0 ||
- currentResult >= gdaResults.Count)
- return null;
-
- return libgda.gda_data_model_get_value_at (
- (IntPtr) gdaResults[currentResult],
- index,
- currentRow);
+ return (object) GetValue (index);
}
}
#region Methods
- [MonoTODO]
public void Close ()
{
- throw new NotImplementedException ();
+ for (int i = 0; i < gdaResults.Count; i++) {
+ IntPtr obj = (IntPtr) gdaResults[i];
+ libgda.FreeObject (obj);
+ gdaResults = null;
+ }
+
+ open = false;
+ currentResult = -1;
+ currentRow = -1;
}
- [MonoTODO]
~OleDbDataReader ()
{
- throw new NotImplementedException ();
+ if (open)
+ Close ();
}
public bool GetBoolean (int ordinal)
return gdaClient;
}
}
-
+
+ [DllImport("gobject-2.0",
+ EntryPoint="g_object_unref")]
+ public static extern void FreeObject (IntPtr obj);
+
[DllImport("gda-2")]
public static extern void gda_init (string app_id, string version, int nargs, string[] args);