Bläddra i källkod

2002-08-18 Rodrigo Moya <[email protected]>

	* System.Data.OleDb/OleDbConnection.cs (ServerVersion): implemented.

svn path=/trunk/mcs/; revision=6724
Rodrigo Moya 23 år sedan
förälder
incheckning
e35eb40d4e

+ 2 - 0
mcs/class/System.Data/ChangeLog

@@ -1,5 +1,7 @@
 2002-08-18  Rodrigo Moya <[email protected]>
 
+	* System.Data.OleDb/OleDbConnection.cs (ServerVersion): implemented.
+
 	* System.Data.OleDb/OleDbDataReader.cs (Close): clear the results
 	ArrayList after releasing the items.
 	(GetName, GetDateTime, GetDouble, GetSingle, GetInt16, GetInt32,

+ 6 - 2
mcs/class/System.Data/System.Data.OleDb/OleDbConnection.cs

@@ -95,9 +95,13 @@ namespace System.Data.OleDb
 		}
 
 		public string ServerVersion {
-			[MonoTODO]
 			get {
-				throw new NotImplementedException ();
+				if (gdaConnection != IntPtr.Zero
+				    && libgda.gda_connection_is_open (gdaConnection)) {
+					return libgda.gda_connection_get_server_version (gdaConnection);
+				}
+
+				return null;
 			}
 		}
 

+ 3 - 0
mcs/class/System.Data/System.Data.OleDb/libgda.cs

@@ -191,6 +191,9 @@ namespace System.Data.OleDb
 		[DllImport("gda-2")]
 		public static extern bool gda_connection_close (IntPtr cnc);
 
+		[DllImport("gda-2")]
+		public static extern string gda_connection_get_server_version (IntPtr cnc);
+		
 		[DllImport("gda-2")]
 		public static extern string gda_connection_get_database (IntPtr cnc);