OdbcCommandBuilder.cs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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. public sealed class OdbcCommandBuilder : Component
  40. {
  41. #region Fields
  42. OdbcDataAdapter adapter;
  43. string quotePrefix;
  44. string quoteSuffix;
  45. #endregion // Fields
  46. #region Constructors
  47. public OdbcCommandBuilder ()
  48. {
  49. adapter = null;
  50. quotePrefix = String.Empty;
  51. quoteSuffix = String.Empty;
  52. }
  53. public OdbcCommandBuilder (OdbcDataAdapter adapter)
  54. : this ()
  55. {
  56. this.adapter = adapter;
  57. }
  58. #endregion // Constructors
  59. #region Properties
  60. [OdbcDescriptionAttribute ("The DataAdapter for which to automatically generate OdbcCommands")]
  61. [DefaultValue (null)]
  62. public OdbcDataAdapter DataAdapter {
  63. get {
  64. return adapter;
  65. }
  66. set {
  67. adapter = value;
  68. }
  69. }
  70. [BrowsableAttribute (false)]
  71. [OdbcDescriptionAttribute ("The prefix string wrapped around sql objects")]
  72. [DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
  73. public string QuotePrefix {
  74. get {
  75. return quotePrefix;
  76. }
  77. set {
  78. quotePrefix = value;
  79. }
  80. }
  81. [BrowsableAttribute (false)]
  82. [OdbcDescriptionAttribute ("The suffix string wrapped around sql objects")]
  83. [DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
  84. public string QuoteSuffix {
  85. get {
  86. return quoteSuffix;
  87. }
  88. set {
  89. quoteSuffix = value;
  90. }
  91. }
  92. #endregion // Properties
  93. #region Methods
  94. public static void DeriveParameters (OdbcCommand command)
  95. {
  96. throw new NotImplementedException ();
  97. }
  98. [MonoTODO]
  99. protected override void Dispose (bool disposing)
  100. {
  101. throw new NotImplementedException ();
  102. }
  103. [MonoTODO]
  104. public OdbcCommand GetDeleteCommand ()
  105. {
  106. throw new NotImplementedException ();
  107. }
  108. [MonoTODO]
  109. public OdbcCommand GetInsertCommand ()
  110. {
  111. throw new NotImplementedException ();
  112. }
  113. [MonoTODO]
  114. public OdbcCommand GetUpdateCommand ()
  115. {
  116. throw new NotImplementedException ();
  117. }
  118. [MonoTODO]
  119. public void RefreshSchema ()
  120. {
  121. throw new NotImplementedException ();
  122. }
  123. #endregion // Methods
  124. }
  125. }