2002-05-18 Daniel Morgan <danmorg@sc.rr.com>
[mono.git] / mcs / class / System.Data / System.Data.SqlClient / SqlDataAdapter.cs
1 //
2 // System.Data.SqlClient.SqlDataAdapter.cs
3 //
4 // Author:
5 //   Rodrigo Moya (rodrigo@ximian.com)
6 //   Daniel Morgan (danmorg@sc.rr.com)
7 //   Tim Coleman (tim@timcoleman.com)
8 //
9 // (C) Ximian, Inc 2002
10 // Copyright (C) 2002 Tim Coleman
11 //
12
13 using System;
14 using System.ComponentModel;
15 using System.Data;
16 using System.Data.Common;
17
18 namespace System.Data.SqlClient
19 {
20         /// <summary>
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.
24         /// </summary>
25         public sealed class SqlDataAdapter : DbDataAdapter 
26         {
27                 #region Constructors
28                 
29                 public SqlDataAdapter ()        
30                         : this (new SqlCommand ())
31                 {
32                 }
33
34                 public SqlDataAdapter (SqlCommand selectCommand) : base ()
35                 {
36                         this.deleteCommand = new SqlCommand ();
37                         this.insertCommand = new SqlCommand ();
38                         this.selectCommand = selectCommand;
39                         this.updateCommand = new SqlCommand ();
40                 }
41
42                 public SqlDataAdapter (string selectCommandText, SqlConnection selectConnection) 
43                         : this (new SqlCommand (selectCommandText, selectConnection))
44                 { 
45                 }
46
47                 public SqlDataAdapter (string selectCommandText, string selectConnectionString)
48                         : this (selectCommandText, new SqlConnection (selectConnectionString))
49                 {
50                 }
51
52                 #endregion
53
54                 #region Properties
55
56                 public new SqlCommand DeleteCommand {
57                         get { return (SqlCommand)deleteCommand; }
58                         set { deleteCommand = value; }
59                 }
60
61                 public new SqlCommand InsertCommand {
62                         get { return (SqlCommand)insertCommand; }
63                         set { insertCommand = value; }
64                 }
65
66                 public new SqlCommand SelectCommand {
67                         get { return (SqlCommand)selectCommand; }
68                         set { selectCommand = value; }
69                 }
70
71                 public new SqlCommand UpdateCommand {
72                         get { return (SqlCommand)updateCommand; }
73                         set { updateCommand = value; }
74                 }
75
76                 #endregion // Properties
77
78                 #region Methods
79
80                 [MonoTODO]
81                 protected override RowUpdatedEventArgs CreateRowUpdatedEvent (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) 
82                 {
83                         throw new NotImplementedException ();
84                 }
85
86
87                 [MonoTODO]
88                 protected override RowUpdatingEventArgs CreateRowUpdatingEvent (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) 
89                 {
90                         throw new NotImplementedException ();
91                 }
92
93                 protected override void OnRowUpdated (RowUpdatedEventArgs value) 
94                 {
95                         throw new NotImplementedException ();
96                 }
97
98                 protected override void OnRowUpdating (RowUpdatingEventArgs value) 
99                 {
100                         throw new NotImplementedException ();
101                 }
102
103                 #endregion // Methods
104
105                 #region Events and Delegates
106
107                 public event SqlRowUpdatedEventHandler RowUpdated;
108                 public event SqlRowUpdatingEventHandler RowUpdating;
109
110                 #endregion // Events and Delegates
111
112         }
113 }