Author: anagappan
Date: 2007-07-23 02:06:41 -0400 (Mon, 23 Jul 2007)
New Revision: 82463

Modified:
   trunk/mcs/class/System.Data/System.Data.SqlClient/ChangeLog
   trunk/mcs/class/System.Data/System.Data.SqlClient/SqlCommandBuilder.cs
Log:
2007-07-23  Nagappan A  <[EMAIL PROTECTED]>

        * SqlCommandBuilder.cs (ApplyParameterInfo, GetParameterName):
        (GetParameterPlaceholder): Implemented 2.0 missing APIs.



Modified: trunk/mcs/class/System.Data/System.Data.SqlClient/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data.SqlClient/ChangeLog 2007-07-23 
05:51:55 UTC (rev 82462)
+++ trunk/mcs/class/System.Data/System.Data.SqlClient/ChangeLog 2007-07-23 
06:06:41 UTC (rev 82463)
@@ -1,3 +1,8 @@
+2007-07-23  Nagappan A  <[EMAIL PROTECTED]>
+
+       * SqlCommandBuilder.cs (ApplyParameterInfo, GetParameterName):
+       (GetParameterPlaceholder): Implemented 2.0 missing APIs.
+
 2007-07-22  Nagappan A  <[EMAIL PROTECTED]>
 
        * SqlBulkCopy.cs (NotifyAfter): Implemented 2.0 property.

Modified: trunk/mcs/class/System.Data/System.Data.SqlClient/SqlCommandBuilder.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.SqlClient/SqlCommandBuilder.cs      
2007-07-23 05:51:55 UTC (rev 82462)
+++ trunk/mcs/class/System.Data/System.Data.SqlClient/SqlCommandBuilder.cs      
2007-07-23 06:06:41 UTC (rev 82463)
@@ -491,7 +491,7 @@
                        command.DeriveParameters ();
                }
 
-               protected override void Dispose (bool disposing)
+               protected new void Dispose (bool disposing)
                {
                        if (!disposed) {
                                if (disposing) {
@@ -636,7 +636,7 @@
 
                public
 #if NET_2_0
-               override
+               new
 #endif
                void RefreshSchema () 
                {
@@ -649,32 +649,36 @@
                }
 
 #if NET_2_0
-                [MonoTODO]
                 protected override void ApplyParameterInfo (DbParameter 
dbParameter,
                                                            DataRow row,
                                                            StatementType 
statementType,
                                                            bool whereClause)
                 {
-                        throw new NotImplementedException ();
+                       SqlParameter parameter = (SqlParameter) dbParameter;
+                       parameter.Size = int.Parse (row ["ColumnSize"].ToString 
());
+                       if (row ["NumericPrecision"] != DBNull.Value) {
+                               parameter.Precision = byte.Parse (row 
["NumericPrecision"].ToString ());
+                       }
+                       if (row ["NumericScale"] != DBNull.Value) {
+                               parameter.Scale = byte.Parse (row 
["NumericScale"].ToString ());
+                       }
+                       parameter.SqlDbType = (SqlDbType) row ["ProviderType"];
                 }
 
-                [MonoTODO]
                 protected override string GetParameterName (int position)
                 {
-                        throw new NotImplementedException ();                  
      
+                       return String.Format("@p{0}", position);
                 }
 
-                [MonoTODO]
                 protected override string GetParameterName (string 
parameterName)
                 {
-                        throw new NotImplementedException ();                  
      
+                       return String.Format("@{0}", parameterName);            
           
                 }
                 
 
-                [MonoTODO]
                 protected override string GetParameterPlaceholder (int 
position)
                 {
-                        throw new NotImplementedException ();                  
      
+                       return GetParameterName (position);
                 }
                 
 #endif // NET_2_0

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to