Author: anagappan
Date: 2007-09-27 13:28:40 -0400 (Thu, 27 Sep 2007)
New Revision: 86517
Modified:
trunk/mcs/class/System.Data/System.Data.Common/ChangeLog
trunk/mcs/class/System.Data/System.Data.Common/DbCommandBuilder.cs
trunk/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs
Log:
* DbDataAdapter.cs: Added MonoTODO in appropriate place.
* DbCommandBuilder.cs (initializeCommand): Implemented missing API.
Modified: trunk/mcs/class/System.Data/System.Data.Common/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data.Common/ChangeLog 2007-09-27
17:26:28 UTC (rev 86516)
+++ trunk/mcs/class/System.Data/System.Data.Common/ChangeLog 2007-09-27
17:28:40 UTC (rev 86517)
@@ -1,3 +1,9 @@
+2007-09-27 Nagappan A <[EMAIL PROTECTED]>
+
+ * DbDataAdapter.cs: Added MonoTODO in appropriate place.
+
+ * DbCommandBuilder.cs (initializeCommand): Implemented missing API.
+
2007-09-25 Nagappan A <[EMAIL PROTECTED]>
* DbConnection.cs: 2.0 attribute fixes.
Modified: trunk/mcs/class/System.Data/System.Data.Common/DbCommandBuilder.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.Common/DbCommandBuilder.cs
2007-09-27 17:26:28 UTC (rev 86516)
+++ trunk/mcs/class/System.Data/System.Data.Common/DbCommandBuilder.cs
2007-09-27 17:28:40 UTC (rev 86517)
@@ -52,7 +52,7 @@
private string _quotePrefix;
private string _quoteSuffix;
private string _schemaSeperator = ".";
- private DbCommand _dbCommand;
+ private DbCommand _dbCommand = null;
// Used to construct WHERE clauses
static readonly string clause1 = "({0} = 1 AND {1} IS NULL)";
@@ -241,6 +241,7 @@
// We're all done, so bring it on home
string sql = String.Format ("{0} WHERE ({1})", command,
whereClause.ToString ());
_deleteCommand.CommandText = sql;
+ _dbCommand = _deleteCommand;
return _deleteCommand;
}
@@ -282,6 +283,7 @@
sql = String.Format ("{0} ({1}) VALUES ({2})", command,
columns.ToString (), values.ToString ());
_insertCommand.CommandText = sql;
+ _dbCommand = _insertCommand;
return _insertCommand;
}
@@ -390,6 +392,7 @@
// We're all done, so bring it on home
string sql = String.Format ("{0}{1} WHERE ({2})",
command, columns.ToString (), whereClause.ToString ());
_updateCommand.CommandText = sql;
+ _dbCommand = _updateCommand;
return _updateCommand;
}
@@ -542,10 +545,18 @@
return _updateCommand;
}
- [MonoTODO]
protected virtual DbCommand InitializeCommand (DbCommand
command)
{
- throw new NotImplementedException ();
+ if (_dbCommand == null) {
+ _dbCommand = SourceCommand;
+ } else {
+ _dbCommand.CommandTimeout = 30;
+ _dbCommand.Transaction = null;
+ _dbCommand.CommandType = CommandType.Text;
+ _dbCommand.UpdatedRowSource =
UpdateRowSource.None;
+ }
+ return _dbCommand;
+
}
public virtual string QuoteIdentifier (string
unquotedIdentifier)
Modified: trunk/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs
2007-09-27 17:26:28 UTC (rev 86516)
+++ trunk/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs
2007-09-27 17:28:40 UTC (rev 86517)
@@ -130,10 +130,10 @@
set { ((IDbDataAdapter) this).UpdateCommand = value; }
}
- [MonoTODO]
[DefaultValue (1)]
public virtual int UpdateBatchSize {
get { return 1; }
+ [MonoTODO]
set { throw new NotSupportedException (); }
}
#else
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches