OdbcCommandBuilder.cs 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. //
  2. // System.Data.Odbc.OdbcCommandBuilder
  3. //
  4. // Author:
  5. // Umadevi S ([email protected])
  6. //
  7. // Copyright (C) Novell Inc, 2004
  8. //
  9. //
  10. // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
  11. //
  12. // Permission is hereby granted, free of charge, to any person obtaining
  13. // a copy of this software and associated documentation files (the
  14. // "Software"), to deal in the Software without restriction, including
  15. // without limitation the rights to use, copy, modify, merge, publish,
  16. // distribute, sublicense, and/or sell copies of the Software, and to
  17. // permit persons to whom the Software is furnished to do so, subject to
  18. // the following conditions:
  19. //
  20. // The above copyright notice and this permission notice shall be
  21. // included in all copies or substantial portions of the Software.
  22. //
  23. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  24. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  25. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  26. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  27. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  28. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  29. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  30. //
  31. using System.ComponentModel;
  32. using System.Data;
  33. using System.Data.Common;
  34. namespace System.Data.Odbc
  35. {
  36. /// <summary>
  37. /// Provides a means of automatically generating single-table commands used to reconcile changes made to a DataSet with the associated database. This class cannot be inherited.
  38. /// </summary>
  39. #if ONLY_1_1
  40. public sealed class OdbcCommandBuilder : Component
  41. #else // NET_2_0 and higher
  42. public sealed class OdbcCommandBuilder : DbCommandBuilder
  43. #endif // ONLY_1_1
  44. {
  45. #region Fields
  46. OdbcDataAdapter adapter;
  47. string quotePrefix;
  48. string quoteSuffix;
  49. #endregion // Fields
  50. #region Constructors
  51. public OdbcCommandBuilder ()
  52. {
  53. adapter = null;
  54. quotePrefix = String.Empty;
  55. quoteSuffix = String.Empty;
  56. }
  57. public OdbcCommandBuilder (OdbcDataAdapter adapter)
  58. : this ()
  59. {
  60. this.adapter = adapter;
  61. }
  62. #endregion // Constructors
  63. #region Properties
  64. [OdbcDescriptionAttribute ("The DataAdapter for which to automatically generate OdbcCommands")]
  65. [DefaultValue (null)]
  66. public
  67. #if NET_2_0
  68. new
  69. #endif // NET_2_0
  70. OdbcDataAdapter DataAdapter {
  71. get {
  72. return adapter;
  73. }
  74. set {
  75. adapter = value;
  76. }
  77. }
  78. [BrowsableAttribute (false)]
  79. [OdbcDescriptionAttribute ("The prefix string wrapped around sql objects")]
  80. [DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
  81. public
  82. #if NET_2_0
  83. override
  84. #endif // NET_2_0
  85. string QuotePrefix {
  86. get {
  87. return quotePrefix;
  88. }
  89. set {
  90. quotePrefix = value;
  91. }
  92. }
  93. [BrowsableAttribute (false)]
  94. [OdbcDescriptionAttribute ("The suffix string wrapped around sql objects")]
  95. [DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
  96. public
  97. #if NET_2_0
  98. override
  99. #endif // NET_2_0
  100. string QuoteSuffix {
  101. get {
  102. return quoteSuffix;
  103. }
  104. set {
  105. quoteSuffix = value;
  106. }
  107. }
  108. #endregion // Properties
  109. #region Methods
  110. public static void DeriveParameters (OdbcCommand command)
  111. {
  112. throw new NotImplementedException ();
  113. }
  114. [MonoTODO]
  115. protected override void Dispose (bool disposing)
  116. {
  117. throw new NotImplementedException ();
  118. }
  119. [MonoTODO]
  120. public
  121. #if NET_2_0
  122. new
  123. #endif // NET_2_0
  124. OdbcCommand GetDeleteCommand ()
  125. {
  126. throw new NotImplementedException ();
  127. }
  128. [MonoTODO]
  129. public
  130. #if NET_2_0
  131. new
  132. #endif // NET_2_0
  133. OdbcCommand GetInsertCommand ()
  134. {
  135. throw new NotImplementedException ();
  136. }
  137. [MonoTODO]
  138. public
  139. #if NET_2_0
  140. new
  141. #endif // NET_2_0
  142. OdbcCommand GetUpdateCommand ()
  143. {
  144. throw new NotImplementedException ();
  145. }
  146. [MonoTODO]
  147. public
  148. #if NET_2_0
  149. override
  150. #endif // NET_2_0
  151. void RefreshSchema ()
  152. {
  153. throw new NotImplementedException ();
  154. }
  155. #if NET_2_0
  156. [MonoTODO]
  157. protected override void ApplyParameterInfo (IDbDataParameter dbParameter, DataRow row)
  158. {
  159. throw new NotImplementedException ();
  160. }
  161. [MonoTODO]
  162. protected override string GetParameterName (int position)
  163. {
  164. throw new NotImplementedException ();
  165. }
  166. [MonoTODO]
  167. protected override string GetParameterPlaceholder (int position)
  168. {
  169. throw new NotImplementedException ();
  170. }
  171. [MonoTODO]
  172. protected override DbProviderFactory ProviderFactory
  173. {
  174. get {throw new NotImplementedException ();}
  175. }
  176. [MonoTODO]
  177. protected override void SetRowUpdatingHandler (DbDataAdapter adapter)
  178. {
  179. throw new NotImplementedException ();
  180. }
  181. #endif // NET_2_0
  182. #endregion // Methods
  183. }
  184. }