OleDbCommandBuilder.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. [DataSysDescriptionAttribute ("The DataAdapter for which to automatically generate OleDbCommands")]
  63. [DefaultValue (null)]
  64. public OleDbDataAdapter DataAdapter {
  65. get {
  66. return adapter;
  67. }
  68. set {
  69. adapter = value;
  70. }
  71. }
  72. [BrowsableAttribute (false)]
  73. [DataSysDescriptionAttribute ("The prefix string wrapped around sql objects")]
  74. [DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
  75. public string QuotePrefix {
  76. get {
  77. return quotePrefix;
  78. }
  79. set {
  80. quotePrefix = value;
  81. }
  82. }
  83. [BrowsableAttribute (false)]
  84. [DataSysDescriptionAttribute ("The suffix string wrapped around sql objects")]
  85. [DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
  86. public string QuoteSuffix {
  87. get {
  88. return quoteSuffix;
  89. }
  90. set {
  91. quoteSuffix = value;
  92. }
  93. }
  94. #endregion // Properties
  95. #region Methods
  96. public static void DeriveParameters (OleDbCommand command)
  97. {
  98. throw new NotImplementedException ();
  99. }
  100. [MonoTODO]
  101. protected override void Dispose (bool disposing)
  102. {
  103. throw new NotImplementedException ();
  104. }
  105. [MonoTODO]
  106. public OleDbCommand GetDeleteCommand ()
  107. {
  108. throw new NotImplementedException ();
  109. }
  110. [MonoTODO]
  111. public OleDbCommand GetInsertCommand ()
  112. {
  113. throw new NotImplementedException ();
  114. }
  115. [MonoTODO]
  116. public OleDbCommand GetUpdateCommand ()
  117. {
  118. throw new NotImplementedException ();
  119. }
  120. [MonoTODO]
  121. public void RefreshSchema ()
  122. {
  123. throw new NotImplementedException ();
  124. }
  125. #endregion // Methods
  126. }
  127. }