2 // System.Data.SqlClient.SqlDataAdapter.cs
5 // Rodrigo Moya (rodrigo@ximian.com)
6 // Daniel Morgan (danmorg@sc.rr.com)
7 // Tim Coleman (tim@timcoleman.com)
9 // (C) Ximian, Inc 2002
10 // Copyright (C) 2002 Tim Coleman
14 using System.ComponentModel;
16 using System.Data.Common;
18 namespace System.Data.SqlClient
21 /// Represents a set of command-related properties that are used
22 /// to fill the DataSet and update a data source, all this
23 /// from a SQL database.
25 public sealed class SqlDataAdapter : DbDataAdapter
29 public SqlDataAdapter ()
30 : this (new SqlCommand ())
34 public SqlDataAdapter (SqlCommand selectCommand) : base ()
36 this.deleteCommand = new SqlCommand ();
37 this.insertCommand = new SqlCommand ();
38 this.selectCommand = selectCommand;
39 this.updateCommand = new SqlCommand ();
42 public SqlDataAdapter (string selectCommandText, SqlConnection selectConnection)
43 : this (new SqlCommand (selectCommandText, selectConnection))
47 public SqlDataAdapter (string selectCommandText, string selectConnectionString)
48 : this (selectCommandText, new SqlConnection (selectConnectionString))
56 public new SqlCommand DeleteCommand {
57 get { return (SqlCommand)deleteCommand; }
58 set { deleteCommand = value; }
61 public new SqlCommand InsertCommand {
62 get { return (SqlCommand)insertCommand; }
63 set { insertCommand = value; }
66 public new SqlCommand SelectCommand {
67 get { return (SqlCommand)selectCommand; }
68 set { selectCommand = value; }
71 public new SqlCommand UpdateCommand {
72 get { return (SqlCommand)updateCommand; }
73 set { updateCommand = value; }
76 #endregion // Properties
81 protected override RowUpdatedEventArgs CreateRowUpdatedEvent (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
83 throw new NotImplementedException ();
88 protected override RowUpdatingEventArgs CreateRowUpdatingEvent (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
90 throw new NotImplementedException ();
93 protected override void OnRowUpdated (RowUpdatedEventArgs value)
95 throw new NotImplementedException ();
98 protected override void OnRowUpdating (RowUpdatingEventArgs value)
100 throw new NotImplementedException ();
103 #endregion // Methods
105 #region Events and Delegates
107 public event SqlRowUpdatedEventHandler RowUpdated;
108 public event SqlRowUpdatingEventHandler RowUpdating;
110 #endregion // Events and Delegates