OleDbCommandBuilder.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. //
  2. // System.Data.OleDb.OleDbCommandBuilder
  3. //
  4. // Author:
  5. // Rodrigo Moya ([email protected])
  6. // Tim Coleman ([email protected])
  7. //
  8. // Copyright (C) Rodrigo Moya, 2002
  9. // Copyright (C) Tim Coleman, 2002
  10. //
  11. //
  12. // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
  13. //
  14. // Permission is hereby granted, free of charge, to any person obtaining
  15. // a copy of this software and associated documentation files (the
  16. // "Software"), to deal in the Software without restriction, including
  17. // without limitation the rights to use, copy, modify, merge, publish,
  18. // distribute, sublicense, and/or sell copies of the Software, and to
  19. // permit persons to whom the Software is furnished to do so, subject to
  20. // the following conditions:
  21. //
  22. // The above copyright notice and this permission notice shall be
  23. // included in all copies or substantial portions of the Software.
  24. //
  25. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  26. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  27. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  28. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  29. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  30. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  31. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  32. //
  33. using System.ComponentModel;
  34. using System.Data;
  35. using System.Data.Common;
  36. namespace System.Data.OleDb
  37. {
  38. /// <summary>
  39. /// 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.
  40. /// </summary>
  41. public sealed class OleDbCommandBuilder : Component
  42. {
  43. #region Fields
  44. OleDbDataAdapter adapter;
  45. string quotePrefix;
  46. string quoteSuffix;
  47. #endregion // Fields
  48. #region Constructors
  49. public OleDbCommandBuilder ()
  50. {
  51. adapter = null;
  52. quotePrefix = String.Empty;
  53. quoteSuffix = String.Empty;
  54. }
  55. public OleDbCommandBuilder (OleDbDataAdapter adapter)
  56. : this ()
  57. {
  58. this.adapter = adapter;
  59. }
  60. #endregion // Constructors
  61. #region Properties
  62. #if !NET_2_0
  63. [DataSysDescriptionAttribute ("The DataAdapter for which to automatically generate OleDbCommands")]
  64. #endif
  65. [DefaultValue (null)]
  66. public OleDbDataAdapter DataAdapter {
  67. get {
  68. return adapter;
  69. }
  70. set {
  71. adapter = value;
  72. }
  73. }
  74. [BrowsableAttribute (false)]
  75. #if !NET_2_0
  76. [DataSysDescriptionAttribute ("The prefix string wrapped around sql objects")]
  77. #endif
  78. [DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
  79. public string QuotePrefix {
  80. get {
  81. return quotePrefix;
  82. }
  83. set {
  84. quotePrefix = value;
  85. }
  86. }
  87. [BrowsableAttribute (false)]
  88. #if !NET_2_0
  89. [DataSysDescriptionAttribute ("The suffix string wrapped around sql objects")]
  90. #endif
  91. [DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
  92. public string QuoteSuffix {
  93. get {
  94. return quoteSuffix;
  95. }
  96. set {
  97. quoteSuffix = value;
  98. }
  99. }
  100. #endregion // Properties
  101. #region Methods
  102. public static void DeriveParameters (OleDbCommand command)
  103. {
  104. throw new NotImplementedException ();
  105. }
  106. [MonoTODO]
  107. protected override void Dispose (bool disposing)
  108. {
  109. throw new NotImplementedException ();
  110. }
  111. [MonoTODO]
  112. public OleDbCommand GetDeleteCommand ()
  113. {
  114. throw new NotImplementedException ();
  115. }
  116. [MonoTODO]
  117. public OleDbCommand GetInsertCommand ()
  118. {
  119. throw new NotImplementedException ();
  120. }
  121. [MonoTODO]
  122. public OleDbCommand GetUpdateCommand ()
  123. {
  124. throw new NotImplementedException ();
  125. }
  126. [MonoTODO]
  127. public void RefreshSchema ()
  128. {
  129. throw new NotImplementedException ();
  130. }
  131. #endregion // Methods
  132. }
  133. }