1 <?xml version="1.0" encoding="utf-8"?>
2 <Type Name="DbCommandBuilder" FullName="System.Data.Common.DbCommandBuilder">
3 <TypeSignature Language="C#" Value="public abstract class DbCommandBuilder : System.ComponentModel.Component" />
5 <AssemblyName>System.Data</AssemblyName>
6 <AssemblyVersion>2.0.0.0</AssemblyVersion>
9 <BaseTypeName>System.ComponentModel.Component</BaseTypeName>
13 <since version=".NET 2.0" />
15 <attribution license="cc4" from="Microsoft" modified="false" />
16 <para>The <see cref="T:System.Data.Common.DbCommandBuilder" /> class is provided for the convenience of provider writers creating their own command builders. By inheriting from this class, developers can implement provider specific behavior in their own code.</para>
17 <para>The <see cref="T:System.Data.Common.DbDataAdapter" /> does not automatically generate the SQL statements required to reconcile changes made to a <see cref="T:System.Data.DataSet" /> with the associated data source. However, you can create a <see cref="T:System.Data.Common.DbCommandBuilder" /> object to automatically generate SQL statements for single-table updates if you set the <see cref="P:System.Data.Common.DbDataAdapter.SelectCommand" /> property of the <see cref="T:System.Data.Common.DbDataAdapter" />. Then, any additional SQL statements that you do not set are generated by the <see cref="T:System.Data.Common.DbCommandBuilder" />.</para>
18 <para>The <see cref="T:System.Data.Common.DbCommandBuilder" /> registers itself as a listener for <see cref="E:System.Data.OleDb.OleDbDataAdapter.RowUpdating" /> events whenever you set the <see cref="P:System.Data.Common.DbCommandBuilder.DataAdapter" /> property. You can only associate one <see cref="T:System.Data.Common.DbDataAdapter" /> or <see cref="T:System.Data.Common.DbCommandBuilder" /> object with each other at one time.</para>
19 <para>To generate INSERT, UPDATE, or DELETE statements, the <see cref="T:System.Data.Common.DbCommandBuilder" /> uses the <see cref="P:System.Data.Common.DbDataAdapter.SelectCommand" /> property to retrieve a required set of metadata automatically. If you change the <see cref="P:System.Data.Common.DbDataAdapter.SelectCommand" /> after the metadata has been retrieved (for example, after the first update), you should call the <see cref="M:System.Data.Common.DbCommandBuilder.RefreshSchema" /> method to update the metadata.</para>
20 <para>The SelectCommand must also return at least one primary key or unique column. If none exist, an <see cref="T:System.InvalidOperationException" /> exception is generated, and the commands are not generated.</para>
21 <para>The <see cref="T:System.Data.Common.DbCommandBuilder" /> also uses the <see cref="P:System.Data.Common.DbCommand.Connection" />, <see cref="P:System.Data.Common.DbCommand.CommandTimeout" />, and <see cref="P:System.Data.Common.DbCommand.Transaction" /> properties referenced by the <see cref="P:System.Data.Common.DbDataAdapter.SelectCommand" />. The user should call <see cref="M:System.Data.Common.DbCommandBuilder.RefreshSchema" /> if any of these properties are modified, or if the <see cref="P:System.Data.Common.DbDataAdapter.SelectCommand" /> itself is replaced. Otherwise the <see cref="P:System.Data.Common.DbDataAdapter.InsertCommand" />, <see cref="P:System.Data.Common.DbDataAdapter.UpdateCommand" />, and <see cref="P:System.Data.Common.DbDataAdapter.DeleteCommand" /> properties retain their previous values.</para>
22 <para>If you call <see cref="M:System.ComponentModel.Component.Dispose" />, the <see cref="T:System.Data.Common.DbCommandBuilder" /> is disassociated from the <see cref="T:System.Data.Common.DbDataAdapter" />, and the generated commands are no longer used.</para>
25 <attribution license="cc4" from="Microsoft" modified="false" />
26 <para>Automatically generates single-table commands used to reconcile changes made to a <see cref="T:System.Data.DataSet" /> with the associated database. This is an abstract class that can only be inherited.</para>
30 <Member MemberName=".ctor">
31 <MemberSignature Language="C#" Value="protected DbCommandBuilder ();" />
32 <MemberType>Constructor</MemberType>
35 <remarks>To be added.</remarks>
36 <since version=".NET 2.0" />
38 <attribution license="cc4" from="Microsoft" modified="false" />
39 <para>Initializes a new instance of a class that inherits from the <see cref="T:System.Data.Common.DbCommandBuilder" /> class. </para>
43 <AssemblyVersion>2.0.0.0</AssemblyVersion>
46 <Member MemberName="ApplyParameterInfo">
47 <MemberSignature Language="C#" Value="protected abstract void ApplyParameterInfo (System.Data.Common.DbParameter parameter, System.Data.DataRow row, System.Data.StatementType statementType, bool whereClause);" />
48 <MemberType>Method</MemberType>
50 <ReturnType>System.Void</ReturnType>
53 <Parameter Name="parameter" Type="System.Data.Common.DbParameter" />
54 <Parameter Name="row" Type="System.Data.DataRow" />
55 <Parameter Name="statementType" Type="System.Data.StatementType" />
56 <Parameter Name="whereClause" Type="System.Boolean" />
59 <since version=".NET 2.0" />
61 <attribution license="cc4" from="Microsoft" modified="false" />
62 <para>This method allows an implementation of the <see cref="T:System.Data.Common.DbCommandBuilder" /> class to handle provider-specific parameter properties.</para>
65 <attribution license="cc4" from="Microsoft" modified="false" />
66 <para>Allows the provider implementation of the <see cref="T:System.Data.Common.DbCommandBuilder" /> class to handle additional parameter properties.</para>
68 <param name="parameter">
69 <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Data.Common.DbParameter" /> to which the additional modifications are applied. </param>
71 <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.DataRow" /> from the schema table provided by <see cref="M:System.Data.Common.DbDataReader.GetSchemaTable" />. </param>
72 <param name="statementType">
73 <attribution license="cc4" from="Microsoft" modified="false" />The type of command being generated; INSERT, UPDATE or DELETE. </param>
74 <param name="whereClause">
75 <attribution license="cc4" from="Microsoft" modified="false" />true if the parameter is part of the update or delete WHERE clause, false if it is part of the insert or update values. </param>
78 <AssemblyVersion>2.0.0.0</AssemblyVersion>
81 <Member MemberName="CatalogLocation">
82 <MemberSignature Language="C#" Value="public virtual System.Data.Common.CatalogLocation CatalogLocation { set; get; }" />
83 <MemberType>Property</MemberType>
86 <AttributeName>System.ComponentModel.DefaultValue(System.Data.Common.CatalogLocation.Start)</AttributeName>
90 <ReturnType>System.Data.Common.CatalogLocation</ReturnType>
93 <value>To be added.</value>
94 <remarks>To be added.</remarks>
95 <since version=".NET 2.0" />
97 <attribution license="cc4" from="Microsoft" modified="false" />
98 <para>Sets or gets the <see cref="T:System.Data.Common.CatalogLocation" /> for an instance of the <see cref="T:System.Data.Common.DbCommandBuilder" /> class.</para>
102 <AssemblyVersion>2.0.0.0</AssemblyVersion>
105 <Member MemberName="CatalogSeparator">
106 <MemberSignature Language="C#" Value="public virtual string CatalogSeparator { set; get; }" />
107 <MemberType>Property</MemberType>
110 <AttributeName>System.ComponentModel.DefaultValue(".")</AttributeName>
114 <ReturnType>System.String</ReturnType>
117 <value>To be added.</value>
118 <remarks>To be added.</remarks>
119 <since version=".NET 2.0" />
121 <attribution license="cc4" from="Microsoft" modified="false" />
122 <para>Sets or gets a string used as the catalog separator for an instance of the <see cref="T:System.Data.Common.DbCommandBuilder" /> class.</para>
126 <AssemblyVersion>2.0.0.0</AssemblyVersion>
129 <Member MemberName="ConflictOption">
130 <MemberSignature Language="C#" Value="public virtual System.Data.ConflictOption ConflictOption { set; get; }" />
131 <MemberType>Property</MemberType>
134 <AttributeName>System.ComponentModel.DefaultValue(System.Data.ConflictOption.CompareAllSearchableValues)</AttributeName>
138 <ReturnType>System.Data.ConflictOption</ReturnType>
141 <value>To be added.</value>
142 <remarks>To be added.</remarks>
143 <since version=".NET 2.0" />
145 <attribution license="cc4" from="Microsoft" modified="false" />
146 <para>Specifies which <see cref="T:System.Data.ConflictOption" /> is to be used by the <see cref="T:System.Data.Common.DbCommandBuilder" />.</para>
150 <AssemblyVersion>2.0.0.0</AssemblyVersion>
153 <Member MemberName="DataAdapter">
154 <MemberSignature Language="C#" Value="public System.Data.Common.DbDataAdapter DataAdapter { set; get; }" />
155 <MemberType>Property</MemberType>
158 <AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
161 <AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
165 <ReturnType>System.Data.Common.DbDataAdapter</ReturnType>
168 <value>To be added.</value>
169 <since version=".NET 2.0" />
171 <attribution license="cc4" from="Microsoft" modified="false" />
172 <para>The <see cref="T:System.Data.Common.DbCommandBuilder" /> registers itself as a listener for <see cref="E:System.Data.OleDb.OleDbDataAdapter.RowUpdating" /> events that are generated by the <see cref="T:System.Data.Common.DbDataAdapter" /> specified in this property.</para>
173 <para>When you create a new instance of <see cref="T:System.Data.Common.DbCommandBuilder" />, any existing <see cref="T:System.Data.Common.DbCommandBuilder" /> associated with this <see cref="T:System.Data.Common.DbDataAdapter" /> is released.</para>
176 <attribution license="cc4" from="Microsoft" modified="false" />
177 <para>Gets or sets a <see cref="T:System.Data.Common.DbDataAdapter" /> object for which Transact-SQL statements are automatically generated.</para>
181 <AssemblyVersion>2.0.0.0</AssemblyVersion>
184 <Member MemberName="Dispose">
185 <MemberSignature Language="C#" Value="protected override void Dispose (bool disposing);" />
186 <MemberType>Method</MemberType>
188 <ReturnType>System.Void</ReturnType>
191 <Parameter Name="disposing" Type="System.Boolean" />
194 <since version=".NET 2.0" />
196 <attribution license="cc4" from="Microsoft" modified="false" />
197 <para>This method is called by the public <see cref="Overload:System.Data.Common.DbCommandBuilder.Dispose" /> method and the Finalize method. <see cref="Overload:System.Data.Common.DbCommandBuilder.Dispose" /> invokes the protected <see cref="M:System.Data.Common.DbCommandBuilder.Dispose(System.Boolean)" /> method with the disposing parameter set to true. Finalize invokes Dispose with disposing set to false.</para>
198 <para>When the <paramref name="disposing" /> parameter is true, this method releases all resources held by any managed objects that this <see cref="T:System.Data.Common.DbCommandBuilder" /> references. This method invokes the <see cref="Overload:System.Data.Common.DbCommandBuilder.Dispose" /> method of each referenced object.</para>
201 <attribution license="cc4" from="Microsoft" modified="false" />
202 <para>Releases the unmanaged resources used by the <see cref="T:System.Data.Common.DbCommandBuilder" /> and optionally releases the managed resources.</para>
204 <param name="disposing">
205 <attribution license="cc4" from="Microsoft" modified="false" />true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
208 <AssemblyVersion>2.0.0.0</AssemblyVersion>
211 <Member MemberName="GetDeleteCommand">
212 <MemberSignature Language="C#" Value="public System.Data.Common.DbCommand GetDeleteCommand ();" />
213 <MemberType>Method</MemberType>
215 <ReturnType>System.Data.Common.DbCommand</ReturnType>
219 <returns>To be added.</returns>
220 <since version=".NET 2.0" />
222 <attribution license="cc4" from="Microsoft" modified="false" />
223 <para>An application can use the <see cref="M:System.Data.Common.DbCommandBuilder.GetDeleteCommand" /> method for informational or troubleshooting purposes because it returns the <see cref="T:System.Data.Common.DbCommand" /> object to be executed.</para>
224 <para>You can also use <see cref="M:System.Data.Common.DbCommandBuilder.GetDeleteCommand" /> as the basis of a modified command. For example, you might call <see cref="M:System.Data.Common.DbCommandBuilder.GetDeleteCommand" /> and modify the command text, and then explicitly set that on the <see cref="T:System.Data.Common.DbDataAdapter" />.</para>
225 <para>After the SQL statement is first generated, the application must explicitly call <see cref="M:System.Data.Common.DbCommandBuilder.RefreshSchema" /> if it changes the statement in any way. Otherwise, the <see cref="M:System.Data.Common.DbCommandBuilder.GetDeleteCommand" /> will still be using information from the previous statement, which might not be correct. The SQL statements are first generated either when the application calls <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> or <see cref="M:System.Data.Common.DbCommandBuilder.GetDeleteCommand" />.</para>
228 <attribution license="cc4" from="Microsoft" modified="false" />
229 <para>Gets the automatically generated <see cref="T:System.Data.Common.DbCommand" /> object required to perform deletions at the data source.</para>
233 <AssemblyVersion>2.0.0.0</AssemblyVersion>
236 <Member MemberName="GetDeleteCommand">
237 <MemberSignature Language="C#" Value="public System.Data.Common.DbCommand GetDeleteCommand (bool option);" />
238 <MemberType>Method</MemberType>
240 <ReturnType>System.Data.Common.DbCommand</ReturnType>
243 <Parameter Name="option" Type="System.Boolean" />
246 <param name="option">To be added.</param>
247 <returns>To be added.</returns>
248 <since version=".NET 2.0" />
250 <attribution license="cc4" from="Microsoft" modified="false" />
251 <para>An application can use the <see cref="M:System.Data.Common.DbCommandBuilder.GetDeleteCommand" /> method for informational or troubleshooting purposes because it returns the <see cref="T:System.Data.Common.DbCommand" /> object to be executed.</para>
252 <para>You can also use <see cref="M:System.Data.Common.DbCommandBuilder.GetDeleteCommand" /> as the basis of a modified command. For example, you might call <see cref="M:System.Data.Common.DbCommandBuilder.GetDeleteCommand" /> and modify the command text, and then explicitly set that on the <see cref="T:System.Data.Common.DbDataAdapter" />. </para>
253 <para>After the SQL statement is first generated, the application must explicitly call <see cref="M:System.Data.Common.DbCommandBuilder.RefreshSchema" /> if it changes the statement in any way. Otherwise, the <see cref="M:System.Data.Common.DbCommandBuilder.GetDeleteCommand" /> will still be using information from the previous statement, which might not be correct. The SQL statements are first generated either when the application calls <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> or <see cref="M:System.Data.Common.DbCommandBuilder.GetDeleteCommand" />.</para>
254 <para>The default behavior, when generating parameter names, is to use @p1, @p2, and so on for the various parameters. Passing true for the <paramref name="useColumnsForParameterNames" /> parameter allows you to force the <see cref="T:System.Data.Common.DbCommandBuilder" /> to generate parameters based on the column names instead. This succeeds only if the following conditions are met:</para>
257 <para>The <see cref="F:System.Data.Common.DbMetaDataColumnNames.ParameterNameMaxLength" /> has been specified and its length is equal to or greater than the generated parameter name.</para>
260 <para>The generated parameter name meets the criteria specified in the <see cref="F:System.Data.Common.DbMetaDataColumnNames.ParameterNamePattern" /> regular expression.</para>
263 <para>A <see cref="F:System.Data.Common.DbMetaDataColumnNames.ParameterMarkerFormat" /> is specified.</para>
268 <attribution license="cc4" from="Microsoft" modified="false" />
269 <para>Gets the automatically generated <see cref="T:System.Data.Common.DbCommand" /> object required to perform deletions at the data source, optionally using columns for parameter names.</para>
273 <AssemblyVersion>2.0.0.0</AssemblyVersion>
276 <Member MemberName="GetInsertCommand">
277 <MemberSignature Language="C#" Value="public System.Data.Common.DbCommand GetInsertCommand ();" />
278 <MemberType>Method</MemberType>
280 <ReturnType>System.Data.Common.DbCommand</ReturnType>
284 <returns>To be added.</returns>
285 <since version=".NET 2.0" />
287 <attribution license="cc4" from="Microsoft" modified="false" />
288 <para>An application can use the <see cref="M:System.Data.Common.DbCommandBuilder.GetInsertCommand" /> method for informational or troubleshooting purposes because it returns the text of the <see cref="T:System.Data.Common.DbCommand" /> object to be executed.</para>
289 <para>You can also use <see cref="M:System.Data.Common.DbCommandBuilder.GetInsertCommand" /> as the basis of a modified command. For example, you might call <see cref="M:System.Data.Common.DbCommandBuilder.GetInsertCommand" /> and modify the command text, and then explicitly set that on the <see cref="T:System.Data.Common.DbDataAdapter" />.</para>
290 <para>After the SQL statement is first generated, the application must explicitly call <see cref="M:System.Data.Common.DbCommandBuilder.RefreshSchema" /> if it changes the statement in any way. Otherwise, the <see cref="M:System.Data.Common.DbCommandBuilder.GetInsertCommand" /> will still be using information from the previous statement, which might not be correct. The SQL statements are first generated either when the application calls <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> or <see cref="M:System.Data.Common.DbCommandBuilder.GetInsertCommand" />.</para>
293 <attribution license="cc4" from="Microsoft" modified="false" />
294 <para>Gets the automatically generated <see cref="T:System.Data.Common.DbCommand" /> object required to perform insertions at the data source.</para>
298 <AssemblyVersion>2.0.0.0</AssemblyVersion>
301 <Member MemberName="GetInsertCommand">
302 <MemberSignature Language="C#" Value="public System.Data.Common.DbCommand GetInsertCommand (bool option);" />
303 <MemberType>Method</MemberType>
305 <ReturnType>System.Data.Common.DbCommand</ReturnType>
308 <Parameter Name="option" Type="System.Boolean" />
311 <param name="option">To be added.</param>
312 <returns>To be added.</returns>
313 <since version=".NET 2.0" />
315 <attribution license="cc4" from="Microsoft" modified="false" />
316 <para>An application can use the <see cref="M:System.Data.Common.DbCommandBuilder.GetInsertCommand" /> method for informational or troubleshooting purposes because it returns the text of the <see cref="T:System.Data.Common.DbCommand" /> object to be executed.</para>
317 <para>You can also use <see cref="M:System.Data.Common.DbCommandBuilder.GetInsertCommand" /> as the basis of a modified command. For example, you might call <see cref="M:System.Data.Common.DbCommandBuilder.GetInsertCommand" /> and modify the command text, and then explicitly set that on the <see cref="T:System.Data.Common.DbDataAdapter" />.</para>
318 <para>After the SQL statement is first generated, the application must explicitly call <see cref="M:System.Data.Common.DbCommandBuilder.RefreshSchema" /> if it changes the statement in any way. Otherwise, the <see cref="M:System.Data.Common.DbCommandBuilder.GetInsertCommand" /> will still be using information from the previous statement, which might not be correct. The SQL statements are first generated either when the application calls <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> or <see cref="M:System.Data.Common.DbCommandBuilder.GetInsertCommand" />.</para>
319 <para>The default behavior, when generating parameter names, is to use @p1, @p2, and so on for the various parameters. Passing true for the <paramref name="useColumnsForParameterNames" /> parameter allows you to force the <see cref="T:System.Data.Common.DbCommandBuilder" /> to generate parameters based on the column names instead. Generation of the parameters based on column names succeeds only if the following conditions are met:</para>
322 <para>The <see cref="F:System.Data.Common.DbMetaDataColumnNames.ParameterNameMaxLength" /> has been specified and its length is equal to or greater than the generated parameter name.</para>
325 <para>The generated parameter name meets the criteria specified in the <see cref="F:System.Data.Common.DbMetaDataColumnNames.ParameterNamePattern" /> regular expression.</para>
328 <para>A <see cref="F:System.Data.Common.DbMetaDataColumnNames.ParameterMarkerFormat" /> is specified.</para>
333 <attribution license="cc4" from="Microsoft" modified="false" />
334 <para>Gets the automatically generated <see cref="T:System.Data.Common.DbCommand" /> object required to perform insertions at the data source, optionally using columns for parameter names.</para>
338 <AssemblyVersion>2.0.0.0</AssemblyVersion>
341 <Member MemberName="GetParameterName">
342 <MemberSignature Language="C#" Value="protected abstract string GetParameterName (int parameterOrdinal);" />
343 <MemberType>Method</MemberType>
345 <ReturnType>System.String</ReturnType>
348 <Parameter Name="parameterOrdinal" Type="System.Int32" />
351 <returns>To be added.</returns>
352 <remarks>To be added.</remarks>
353 <since version=".NET 2.0" />
355 <attribution license="cc4" from="Microsoft" modified="false" />
356 <para>Returns the name of the specified parameter in the format of @p#. Use when building a custom command builder.</para>
358 <param name="parameterOrdinal">
359 <attribution license="cc4" from="Microsoft" modified="false" />The number to be included as part of the parameter's name..</param>
362 <AssemblyVersion>2.0.0.0</AssemblyVersion>
365 <Member MemberName="GetParameterName">
366 <MemberSignature Language="C#" Value="protected abstract string GetParameterName (string parameterName);" />
367 <MemberType>Method</MemberType>
369 <ReturnType>System.String</ReturnType>
372 <Parameter Name="parameterName" Type="System.String" />
375 <returns>To be added.</returns>
376 <remarks>To be added.</remarks>
377 <since version=".NET 2.0" />
379 <attribution license="cc4" from="Microsoft" modified="false" />
380 <para>Returns the full parameter name, given the partial parameter name.</para>
382 <param name="parameterName">
383 <attribution license="cc4" from="Microsoft" modified="false" />The partial name of the parameter.</param>
386 <AssemblyVersion>2.0.0.0</AssemblyVersion>
389 <Member MemberName="GetParameterPlaceholder">
390 <MemberSignature Language="C#" Value="protected abstract string GetParameterPlaceholder (int parameterOrdinal);" />
391 <MemberType>Method</MemberType>
393 <ReturnType>System.String</ReturnType>
396 <Parameter Name="parameterOrdinal" Type="System.Int32" />
399 <returns>To be added.</returns>
400 <since version=".NET 2.0" />
402 <attribution license="cc4" from="Microsoft" modified="false" />
403 <para>This method is intended for use by provider writers building a custom command builder.</para>
406 <attribution license="cc4" from="Microsoft" modified="false" />
407 <para>Returns the placeholder for the parameter in the associated SQL statement.</para>
409 <param name="parameterOrdinal">
410 <attribution license="cc4" from="Microsoft" modified="false" />The number to be included as part of the parameter's name.</param>
413 <AssemblyVersion>2.0.0.0</AssemblyVersion>
416 <Member MemberName="GetSchemaTable">
417 <MemberSignature Language="C#" Value="protected virtual System.Data.DataTable GetSchemaTable (System.Data.Common.DbCommand cmd);" />
418 <MemberType>Method</MemberType>
420 <ReturnType>System.Data.DataTable</ReturnType>
423 <Parameter Name="cmd" Type="System.Data.Common.DbCommand" />
426 <param name="cmd">To be added.</param>
427 <returns>To be added.</returns>
428 <since version=".NET 2.0" />
430 <attribution license="cc4" from="Microsoft" modified="false" />
431 <para>This method is intended for use by provider writers building a custom command builder.</para>
434 <attribution license="cc4" from="Microsoft" modified="false" />
435 <para>Returns the schema table for the <see cref="T:System.Data.Common.DbCommandBuilder" />.</para>
439 <AssemblyVersion>2.0.0.0</AssemblyVersion>
442 <Member MemberName="GetUpdateCommand">
443 <MemberSignature Language="C#" Value="public System.Data.Common.DbCommand GetUpdateCommand ();" />
444 <MemberType>Method</MemberType>
446 <ReturnType>System.Data.Common.DbCommand</ReturnType>
450 <returns>To be added.</returns>
451 <since version=".NET 2.0" />
453 <attribution license="cc4" from="Microsoft" modified="false" />
454 <para>An application can use the <see cref="M:System.Data.Common.DbCommandBuilder.GetUpdateCommand" /> method for informational or troubleshooting purposes because it returns the <see cref="T:System.Data.Common.DbCommand" /> object to be executed.</para>
455 <para>You can also use <see cref="M:System.Data.Common.DbCommandBuilder.GetUpdateCommand" /> as the basis of a modified command. For example, you might call <see cref="M:System.Data.Common.DbCommandBuilder.GetUpdateCommand" /> and modify the command text, and then explicitly set that on the <see cref="T:System.Data.Common.DbDataAdapter" />.</para>
456 <para>After the SQL statement is first generated, the application must explicitly call <see cref="M:System.Data.Common.DbCommandBuilder.RefreshSchema" /> if it changes the statement in any way. Otherwise, the <see cref="M:System.Data.Common.DbCommandBuilder.GetUpdateCommand" /> will still be using information from the previous statement, which might not be correct. The SQL statements are first generated either when the application calls <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> or <see cref="M:System.Data.Common.DbCommandBuilder.GetUpdateCommand" />.</para>
459 <attribution license="cc4" from="Microsoft" modified="false" />
460 <para>Gets the automatically generated <see cref="T:System.Data.Common.DbCommand" /> object required to perform updates at the data source.</para>
464 <AssemblyVersion>2.0.0.0</AssemblyVersion>
467 <Member MemberName="GetUpdateCommand">
468 <MemberSignature Language="C#" Value="public System.Data.Common.DbCommand GetUpdateCommand (bool option);" />
469 <MemberType>Method</MemberType>
471 <ReturnType>System.Data.Common.DbCommand</ReturnType>
474 <Parameter Name="option" Type="System.Boolean" />
477 <param name="option">To be added.</param>
478 <returns>To be added.</returns>
479 <since version=".NET 2.0" />
481 <attribution license="cc4" from="Microsoft" modified="false" />
482 <para>An application can use the <see cref="M:System.Data.Common.DbCommandBuilder.GetUpdateCommand" /> method for informational or troubleshooting purposes because it returns the <see cref="T:System.Data.Common.DbCommand" /> object to be executed.</para>
483 <para>You can also use <see cref="M:System.Data.Common.DbCommandBuilder.GetUpdateCommand" /> as the basis of a modified command. For example, you might call <see cref="M:System.Data.Common.DbCommandBuilder.GetUpdateCommand" /> and modify command text, and then explicitly set that on the <see cref="T:System.Data.Common.DbDataAdapter" />.</para>
484 <para>After the SQL statement is first generated, the application must explicitly call <see cref="M:System.Data.Common.DbCommandBuilder.RefreshSchema" /> if it changes the statement in any way. Otherwise, the <see cref="M:System.Data.Common.DbCommandBuilder.GetUpdateCommand" /> will still be using information from the previous statement, which might not be correct. The SQL statements are first generated either when the application calls <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> or <see cref="M:System.Data.Common.DbCommandBuilder.GetUpdateCommand" />.</para>
485 <para>The default behavior, when generating parameter names, is to use @p1, @p2, and so on for the various parameters. Passing true for the <paramref name="useColumnsForParameterNames" /> parameter allows you to force the <see cref="T:System.Data.Common.DbCommandBuilder" /> to generate parameters based on the column names instead. Generation of the parameters based on column names succeeds only if the following conditions are met:</para>
488 <para>The <see cref="F:System.Data.Common.DbMetaDataColumnNames.ParameterNameMaxLength" /> has been specified and its length is equal to or greater than the generated parameter name.</para>
491 <para>The generated parameter name meets the criteria specified in the <see cref="F:System.Data.Common.DbMetaDataColumnNames.ParameterNamePattern" /> regular expression.</para>
494 <para>A <see cref="F:System.Data.Common.DbMetaDataColumnNames.ParameterMarkerFormat" /> is specified.</para>
499 <attribution license="cc4" from="Microsoft" modified="false" />
500 <para>Gets the automatically generated <see cref="T:System.Data.Common.DbCommand" /> object required to perform updates at the data source, optionally using columns for parameter names.</para>
504 <AssemblyVersion>2.0.0.0</AssemblyVersion>
507 <Member MemberName="InitializeCommand">
508 <MemberSignature Language="C#" Value="protected virtual System.Data.Common.DbCommand InitializeCommand (System.Data.Common.DbCommand command);" />
509 <MemberType>Method</MemberType>
511 <ReturnType>System.Data.Common.DbCommand</ReturnType>
514 <Parameter Name="command" Type="System.Data.Common.DbCommand" />
517 <returns>To be added.</returns>
518 <since version=".NET 2.0" />
520 <attribution license="cc4" from="Microsoft" modified="false" />
521 <para>This method is intended for use by provider writers building a custom command builder.</para>
524 <attribution license="cc4" from="Microsoft" modified="false" />
525 <para>Resets the <see cref="P:System.Data.Common.DbCommand.CommandTimeout" />, <see cref="P:System.Data.Common.DbCommand.Transaction" />, <see cref="P:System.Data.Common.DbCommand.CommandType" />, and <see cref="T:System.Data.UpdateRowSource" /> properties on the <see cref="T:System.Data.Common.DbCommand" />.</para>
527 <param name="command">
528 <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.Common.DbCommand" /> to be used by the command builder for the corresponding insert, update, or delete command.</param>
531 <AssemblyVersion>2.0.0.0</AssemblyVersion>
534 <Member MemberName="QuoteIdentifier">
535 <MemberSignature Language="C#" Value="public virtual string QuoteIdentifier (string unquotedIdentifier);" />
536 <MemberType>Method</MemberType>
538 <ReturnType>System.String</ReturnType>
541 <Parameter Name="unquotedIdentifier" Type="System.String" />
544 <returns>To be added.</returns>
545 <remarks>To be added.</remarks>
546 <since version=".NET 2.0" />
548 <attribution license="cc4" from="Microsoft" modified="false" />
549 <para>Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier.</para>
551 <param name="unquotedIdentifier">
552 <attribution license="cc4" from="Microsoft" modified="false" />The original unquoted identifier.</param>
555 <AssemblyVersion>2.0.0.0</AssemblyVersion>
558 <Member MemberName="QuotePrefix">
559 <MemberSignature Language="C#" Value="public virtual string QuotePrefix { set; get; }" />
560 <MemberType>Property</MemberType>
563 <AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
567 <ReturnType>System.String</ReturnType>
570 <value>To be added.</value>
571 <since version=".NET 2.0" />
573 <attribution license="cc4" from="Microsoft" modified="false" />
574 <para>Some data sources may have objects that can contain characters such as spaces, commas, and semicolons. To accommodate this capability, use the <see cref="P:System.Data.Common.DbCommandBuilder.QuotePrefix" /> and <see cref="P:System.Data.Common.DbCommandBuilder.QuoteSuffix" /> properties to specify delimiters such as a left bracket and a right bracket to encapsulate the object name.</para>
575 <block subset="none" type="note">
576 <para>Although you cannot change the <see cref="P:System.Data.Common.DbCommandBuilder.QuotePrefix" /> or <see cref="P:System.Data.Common.DbCommandBuilder.QuoteSuffix" /> properties after an insert, update, or delete command has been generated, you can change their settings after calling the Update method of a <see cref="T:System.Data.Common.DbDataAdapter" />.</para>
580 <attribution license="cc4" from="Microsoft" modified="false" />
581 <para>Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.</para>
585 <AssemblyVersion>2.0.0.0</AssemblyVersion>
588 <Member MemberName="QuoteSuffix">
589 <MemberSignature Language="C#" Value="public virtual string QuoteSuffix { set; get; }" />
590 <MemberType>Property</MemberType>
593 <AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
597 <ReturnType>System.String</ReturnType>
600 <value>To be added.</value>
601 <since version=".NET 2.0" />
603 <attribution license="cc4" from="Microsoft" modified="false" />
604 <para>Some data sources may have objects that can contain characters such as spaces, commas, and semicolons. To accommodate this capability, use the <see cref="P:System.Data.Common.DbCommandBuilder.QuotePrefix" /> and <see cref="P:System.Data.Common.DbCommandBuilder.QuoteSuffix" /> properties to specify delimiters such as a left bracket and a right bracket to encapsulate the object name.</para>
605 <block subset="none" type="note">
606 <para>Although you cannot change the <see cref="P:System.Data.Common.DbCommandBuilder.QuotePrefix" /> or <see cref="P:System.Data.Common.DbCommandBuilder.QuoteSuffix" /> properties after an insert, update, or delete command has been generated, you can change their settings after calling the Update method of a <see cref="T:System.Data.Common.DbDataAdapter" />.</para>
610 <attribution license="cc4" from="Microsoft" modified="false" />
611 <para>Gets or sets the ending character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.</para>
615 <AssemblyVersion>2.0.0.0</AssemblyVersion>
618 <Member MemberName="RefreshSchema">
619 <MemberSignature Language="C#" Value="public virtual void RefreshSchema ();" />
620 <MemberType>Method</MemberType>
622 <ReturnType>System.Void</ReturnType>
626 <since version=".NET 2.0" />
628 <attribution license="cc4" from="Microsoft" modified="false" />
629 <para>Calling the <see cref="M:System.Data.Common.DbCommandBuilder.RefreshSchema" /> method effectively removes all the <see cref="T:System.Data.Common.DbCommand" /> objects referred to by the <see cref="P:System.Data.Common.DbDataAdapter.SelectCommand" />,</para>
631 <see cref="P:System.Data.Common.DbDataAdapter.UpdateCommand" />,</para>
633 <see cref="P:System.Data.Common.DbDataAdapter.DeleteCommand" />, and</para>
635 <see cref="P:System.Data.Common.DbDataAdapter.InsertCommand" /> properties.</para>
638 <attribution license="cc4" from="Microsoft" modified="false" />
639 <para>Clears the commands associated with this <see cref="T:System.Data.Common.DbCommandBuilder" />.</para>
643 <AssemblyVersion>2.0.0.0</AssemblyVersion>
646 <Member MemberName="RowUpdatingHandler">
647 <MemberSignature Language="C#" Value="protected void RowUpdatingHandler (System.Data.Common.RowUpdatingEventArgs args);" />
648 <MemberType>Method</MemberType>
650 <ReturnType>System.Void</ReturnType>
653 <Parameter Name="args" Type="System.Data.Common.RowUpdatingEventArgs" />
656 <param name="args">To be added.</param>
657 <remarks>To be added.</remarks>
658 <since version=".NET 2.0" />
660 <attribution license="cc4" from="Microsoft" modified="false" />
661 <para>Adds an event handler for the <see cref="E:System.Data.OleDb.OleDbDataAdapter.RowUpdating" /> event.</para>
665 <AssemblyVersion>2.0.0.0</AssemblyVersion>
668 <Member MemberName="SchemaSeparator">
669 <MemberSignature Language="C#" Value="public virtual string SchemaSeparator { set; get; }" />
670 <MemberType>Property</MemberType>
673 <AttributeName>System.ComponentModel.DefaultValue(".")</AttributeName>
677 <ReturnType>System.String</ReturnType>
680 <value>To be added.</value>
681 <since version=".NET 2.0" />
683 <attribution license="cc4" from="Microsoft" modified="false" />
684 <para>Generally, database servers indicate the schema for an identifier by separating the schema name from the identifier with some character. For example, SQL Server uses a colon, creating complete identifiers such as Person:CustomerName, where "Person" is the schema name and "CustomerName" is the identifier. Setting this property allows developers to modify this behavior.</para>
687 <attribution license="cc4" from="Microsoft" modified="false" />
688 <para>Gets or sets the character to be used for the separator between the schema identifier and any other identifiers.</para>
692 <AssemblyVersion>2.0.0.0</AssemblyVersion>
695 <Member MemberName="SetAllValues">
696 <MemberSignature Language="C#" Value="public bool SetAllValues { set; get; }" />
697 <MemberType>Property</MemberType>
700 <AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
704 <ReturnType>System.Boolean</ReturnType>
707 <value>To be added.</value>
708 <since version=".NET 2.0" />
710 <attribution license="cc4" from="Microsoft" modified="false" />
711 <para>The UPDATE statement generated by a <see cref="T:System.Data.Common.DbCommandBuilder" /> can include update information about all the columns, or it can include information only about those columns whose values have changed. Setting the <see cref="P:System.Data.Common.DbCommandBuilder.SetAllValues" /> property to true causes the generated UPDATE statement to include all the columns, whether their values have changed or not.</para>
714 <attribution license="cc4" from="Microsoft" modified="false" />
715 <para>Specifies whether all column values in an update statement are included or only changed ones.</para>
719 <AssemblyVersion>2.0.0.0</AssemblyVersion>
722 <Member MemberName="SetRowUpdatingHandler">
723 <MemberSignature Language="C#" Value="protected abstract void SetRowUpdatingHandler (System.Data.Common.DbDataAdapter adapter);" />
724 <MemberType>Method</MemberType>
726 <ReturnType>System.Void</ReturnType>
729 <Parameter Name="adapter" Type="System.Data.Common.DbDataAdapter" />
732 <since version=".NET 2.0" />
734 <attribution license="cc4" from="Microsoft" modified="false" />
735 <para>This method is intended for use by provider writers building a custom command builder. When a new <see cref="T:System.Data.Common.DbDataAdapter" /> is added to the <see cref="T:System.Data.Common.DbCommandBuilder" />, it is registered for the DbDataAdapter's RowUpdating event. If this method is called again with the same <see cref="T:System.Data.Common.DbDataAdapter" />, the <see cref="T:System.Data.Common.DbCommandBuilder" /> is unregistered for that DbDataAdapter's RowUpdating event.</para>
738 <attribution license="cc4" from="Microsoft" modified="false" />
739 <para>Registers the <see cref="T:System.Data.Common.DbCommandBuilder" /> to handle the <see cref="E:System.Data.OleDb.OleDbDataAdapter.RowUpdating" /> event for a <see cref="T:System.Data.Common.DbDataAdapter" />. </para>
741 <param name="adapter">
742 <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.Common.DbDataAdapter" /> to be used for the update.</param>
745 <AssemblyVersion>2.0.0.0</AssemblyVersion>
748 <Member MemberName="UnquoteIdentifier">
749 <MemberSignature Language="C#" Value="public virtual string UnquoteIdentifier (string quotedIdentifier);" />
750 <MemberType>Method</MemberType>
752 <ReturnType>System.String</ReturnType>
755 <Parameter Name="quotedIdentifier" Type="System.String" />
758 <returns>To be added.</returns>
759 <remarks>To be added.</remarks>
760 <since version=".NET 2.0" />
762 <attribution license="cc4" from="Microsoft" modified="false" />
763 <para>Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier.</para>
765 <param name="quotedIdentifier">
766 <attribution license="cc4" from="Microsoft" modified="false" />The identifier that will have its embedded quotes removed.</param>
769 <AssemblyVersion>2.0.0.0</AssemblyVersion>