| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677 |
- <?xml version="1.0" encoding="utf-8"?>
- <Type Name="SqlCommand" FullName="System.Data.SqlClient.SqlCommand">
- <TypeSignature Language="C#" Maintainer="auto" Value="public sealed class SqlCommand : System.Data.Common.DbCommand, ICloneable" />
- <AssemblyInfo>
- <AssemblyName>System.Data</AssemblyName>
- <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey>
- <AssemblyVersion>1.0.3300.0</AssemblyVersion>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
- <Base>
- <BaseTypeName>System.Data.Common.DbCommand</BaseTypeName>
- </Base>
- <Interfaces>
- <Interface>
- <InterfaceName>System.ICloneable</InterfaceName>
- </Interface>
- </Interfaces>
- <Attributes>
- <Attribute>
- <AttributeName>System.ComponentModel.DefaultEvent("RecordsAffected")</AttributeName>
- </Attribute>
- <Attribute>
- <AttributeName>System.ComponentModel.ToolboxItem("System.Drawing.Design.ToolboxItem, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
- </Attribute>
- <Attribute>
- <AttributeName>System.ComponentModel.Designer("Microsoft.VSDesigner.Data.VS.SqlCommandDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")</AttributeName>
- </Attribute>
- </Attributes>
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>When an instance of <see cref="T:System.Data.SqlClient.SqlCommand" /> is created, the read/write properties are set to their initial values. For a list of these values, see the <see cref="T:System.Data.SqlClient.SqlCommand" /> constructor.</para>
- <para>
- <see cref="T:System.Data.SqlClient.SqlCommand" /> features the following methods for executing commands at a SQL Server database: </para>
- <list type="table">
- <listheader>
- <item>
- <term>
- <para>Item </para>
- </term>
- <description>
- <para>Description </para>
- </description>
- </item>
- </listheader>
- <item>
- <term>
- <para>
- <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" />
- </para>
- </term>
- <description>
- <para>Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this <see cref="T:System.Data.SqlClient.SqlCommand" />, generally executing commands such as INSERT, DELETE, UPDATE, and SET statements. Each call to <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" /> must be paired with a call to <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" /> which finishes the operation, typically on a separate thread.</para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" />
- </para>
- </term>
- <description>
- <para>Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this <see cref="T:System.Data.SqlClient.SqlCommand" /> and retrieves one or more results sets from the server. Each call to <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> must be paired with a call to <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> which finishes the operation, typically on a separate thread.</para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" />
- </para>
- </term>
- <description>
- <para>Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this <see cref="T:System.Data.SqlClient.SqlCommand" />. Each call to BeginExecuteXmlReader must be paired with a call to EndExecuteXmlReader, which finishes the operation, typically on a separate thread, and returns an <see cref="T:System.Xml.XmlReader" /> object.</para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" /> </para>
- </term>
- <description>
- <para>Executes commands that return rows. For increased performance, <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" /> invokes commands using the Transact-SQL sp_executesql system stored procedure. Therefore, <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" /> might not have the effect that you want if used to execute commands such as Transact-SQL SET statements. </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteNonQuery" /> </para>
- </term>
- <description>
- <para>Executes commands such as Transact-SQL INSERT, DELETE, UPDATE, and SET statements. </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteScalar" /> </para>
- </term>
- <description>
- <para>Retrieves a single value (for example, an aggregate value) from a database. </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteXmlReader" /> </para>
- </term>
- <description>
- <para>Sends the <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> to the <see cref="P:System.Data.SqlClient.SqlCommand.Connection" /> and builds an <see cref="T:System.Xml.XmlReader" /> object. </para>
- </description>
- </item>
- </list>
- <para>You can reset the <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> property and reuse the <see cref="T:System.Data.SqlClient.SqlCommand" /> object. However, you must close the <see cref="T:System.Data.SqlClient.SqlDataReader" /> before you can execute a new or previous command.</para>
- <para>If a <see cref="T:System.Data.SqlClient.SqlException" /> is generated by the method executing a <see cref="T:System.Data.SqlClient.SqlCommand" />, the <see cref="T:System.Data.SqlClient.SqlConnection" /> remains open when the severity level is 19 or less. When the severity level is 20 or greater, the server ordinarily closes the <see cref="T:System.Data.SqlClient.SqlConnection" />. However, the user can reopen the connection and continue.</para>
- <block subset="none" type="note">
- <para>Nameless, also called ordinal, parameters are not supported by the .NET Framework Data Provider for SQL Server.</para>
- </block>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Represents a Transact-SQL statement or stored procedure to execute against a SQL Server database. This class cannot be inherited.</para>
- </summary>
- </Docs>
- <Members>
- <Member MemberName=".ctor">
- <MemberSignature Language="C#" Value="public SqlCommand ();" />
- <MemberType>Constructor</MemberType>
- <ReturnValue />
- <Parameters />
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The base constructor initializes all fields to their default values. The following table shows initial property values for an instance of <see cref="T:System.Data.SqlClient.SqlCommand" />.</para>
- <list type="table">
- <listheader>
- <item>
- <term>
- <para>Properties </para>
- </term>
- <description>
- <para>Initial value </para>
- </description>
- </item>
- </listheader>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> </para>
- </term>
- <description>
- <para>empty string ("") </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.CommandTimeout" /> </para>
- </term>
- <description>
- <para>30 </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.CommandType" /> </para>
- </term>
- <description>
- <para>CommandType.Text </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.Connection" /> </para>
- </term>
- <description>
- <para>Null </para>
- </description>
- </item>
- </list>
- <para>You can change the value for any of these properties through a separate call to the property.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Initializes a new instance of the <see cref="T:System.Data.SqlClient.SqlCommand" /> class.</para>
- </summary>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- </Member>
- <Member MemberName=".ctor">
- <MemberSignature Language="C#" Value="public SqlCommand (string cmdText);" />
- <MemberType>Constructor</MemberType>
- <ReturnValue />
- <Parameters>
- <Parameter Name="cmdText" Type="System.String" />
- </Parameters>
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>When an instance of <see cref="T:System.Data.SqlClient.SqlCommand" /> is created, the following read/write properties are set to initial values.</para>
- <list type="table">
- <listheader>
- <item>
- <term>
- <para>Properties </para>
- </term>
- <description>
- <para>Initial value </para>
- </description>
- </item>
- </listheader>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> </para>
- </term>
- <description>
- <para>
- <paramref name="cmdText" /> </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.CommandTimeout" /> </para>
- </term>
- <description>
- <para>30 </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.CommandType" /> </para>
- </term>
- <description>
- <para>CommandType.Text </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.Connection" /> </para>
- </term>
- <description>
- <para>null </para>
- </description>
- </item>
- </list>
- <para>You can change the value for any of these properties through a separate call to the property.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Initializes a new instance of the <see cref="T:System.Data.SqlClient.SqlCommand" /> class with the text of the query.</para>
- </summary>
- <param name="cmdText">
- <attribution license="cc4" from="Microsoft" modified="false" />The text of the query. </param>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- </Member>
- <Member MemberName=".ctor">
- <MemberSignature Language="C#" Value="public SqlCommand (string cmdText, System.Data.SqlClient.SqlConnection connection);" />
- <MemberType>Constructor</MemberType>
- <ReturnValue />
- <Parameters>
- <Parameter Name="cmdText" Type="System.String" />
- <Parameter Name="connection" Type="System.Data.SqlClient.SqlConnection" />
- </Parameters>
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The following table shows initial property values for an instance of <see cref="T:System.Data.SqlClient.SqlCommand" />.</para>
- <list type="table">
- <listheader>
- <item>
- <term>
- <para>Properties </para>
- </term>
- <description>
- <para>Initial value </para>
- </description>
- </item>
- </listheader>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> </para>
- </term>
- <description>
- <para>
- <paramref name="cmdText" /> </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.CommandTimeout" /> </para>
- </term>
- <description>
- <para>30 </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.CommandType" /> </para>
- </term>
- <description>
- <para>CommandType.Text </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.Connection" /> </para>
- </term>
- <description>
- <para>A new <see cref="T:System.Data.SqlClient.SqlConnection" /> that is the value for the <paramref name="connection" /> parameter. </para>
- </description>
- </item>
- </list>
- <para>You can change the value for any of these parameters by setting the related property.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Initializes a new instance of the <see cref="T:System.Data.SqlClient.SqlCommand" /> class with the text of the query and a <see cref="T:System.Data.SqlClient.SqlConnection" />.</para>
- </summary>
- <param name="cmdText">
- <attribution license="cc4" from="Microsoft" modified="false" />The text of the query. </param>
- <param name="connection">
- <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Data.SqlClient.SqlConnection" /> that represents the connection to an instance of SQL Server. </param>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- </Member>
- <Member MemberName=".ctor">
- <MemberSignature Language="C#" Value="public SqlCommand (string cmdText, System.Data.SqlClient.SqlConnection connection, System.Data.SqlClient.SqlTransaction transaction);" />
- <MemberType>Constructor</MemberType>
- <ReturnValue />
- <Parameters>
- <Parameter Name="cmdText" Type="System.String" />
- <Parameter Name="connection" Type="System.Data.SqlClient.SqlConnection" />
- <Parameter Name="transaction" Type="System.Data.SqlClient.SqlTransaction" />
- </Parameters>
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The following table shows initial property values for an instance of <see cref="T:System.Data.SqlClient.SqlCommand" />.</para>
- <list type="table">
- <listheader>
- <item>
- <term>
- <para>Properties </para>
- </term>
- <description>
- <para>Initial value </para>
- </description>
- </item>
- </listheader>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> </para>
- </term>
- <description>
- <para>
- <paramref name="cmdText" /> </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.CommandTimeout" /> </para>
- </term>
- <description>
- <para>30 </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.CommandType" /> </para>
- </term>
- <description>
- <para>CommandType.Text </para>
- </description>
- </item>
- <item>
- <term>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.Connection" /> </para>
- </term>
- <description>
- <para>A new <see cref="T:System.Data.SqlClient.SqlConnection" /> that is the value for the <paramref name="connection" /> parameter. </para>
- </description>
- </item>
- </list>
- <para>You can change the value for any of these parameters by setting the related property.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Initializes a new instance of the <see cref="T:System.Data.SqlClient.SqlCommand" /> class with the text of the query, a <see cref="T:System.Data.SqlClient.SqlConnection" />, and the <see cref="T:System.Data.SqlClient.SqlTransaction" />.</para>
- </summary>
- <param name="cmdText">
- <attribution license="cc4" from="Microsoft" modified="false" />The text of the query. </param>
- <param name="connection">
- <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Data.SqlClient.SqlConnection" /> that represents the connection to an instance of SQL Server. </param>
- <param name="transaction">
- <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.SqlClient.SqlTransaction" /> in which the <see cref="T:System.Data.SqlClient.SqlCommand" /> executes. </param>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- </Member>
- <Member MemberName="BeginExecuteNonQuery">
- <MemberSignature Language="C#" Value="public IAsyncResult BeginExecuteNonQuery ();" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.IAsyncResult</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" /> method starts the process of asynchronously executing a tsql statement or stored procedure that does not return rows, so that other tasks can run concurrently while the statement is executing. When the statement has completed, developers must call the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" /> method to finish the operation. The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" /> method returns immediately (<see cref="P:System.Data.SqlClient.SqlCommand.CommandTimeout" /> has no effect on <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" />), but until the code executes the corresponding <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" /> method call, it must not execute any other calls that start a synchronous or asynchronous execution against the same <see cref="T:System.Data.SqlClient.SqlCommand" /> object. Calling the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" /> before the command's execution is completed causes the <see cref="T:System.Data.SqlClient.SqlCommand" /> object to block until the execution is finished.</para>
- <para>Note that the command text and parameters are sent to the server synchronously. If a large command or many parameters are sent, this method may block during writes. After the command is sent, the method returns immediately without waiting for an answer from the server--that is, reads are asynchronous.</para>
- <para>Because this overload does not support a callback procedure, developers must either poll to determine whether the command has completed, using the <see cref="P:System.IAsyncResult.IsCompleted" /> property of the <see cref="T:System.IAsyncResult" /> returned by the <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" /> method; or wait for the completion of one or more commands using the <see cref="P:System.IAsyncResult.AsyncWaitHandle" /> property of the returned <see cref="T:System.IAsyncResult" />.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this <see cref="T:System.Data.SqlClient.SqlCommand" />.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>An <see cref="T:System.IAsyncResult" /> that can be used to poll or wait for results, or both; this value is also needed when invoking <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" />, which returns the number of affected rows.</para>
- </returns>
- </Docs>
- </Member>
- <Member MemberName="BeginExecuteNonQuery">
- <MemberSignature Language="C#" Value="public IAsyncResult BeginExecuteNonQuery (AsyncCallback callback, object stateObject);" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.IAsyncResult</ReturnType>
- </ReturnValue>
- <Parameters>
- <Parameter Name="callback" Type="System.AsyncCallback" />
- <Parameter Name="stateObject" Type="System.Object" />
- </Parameters>
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" /> method starts the process of asynchronously executing a Transact-SQL statement or stored procedure that does not return rows, so that other tasks can run concurrently while the statement is executing. When the statement has completed, developers must call the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" /> method to finish the operation. The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" /> method returns immediately (<see cref="P:System.Data.SqlClient.SqlCommand.CommandTimeout" /> has no effect on <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery(System.AsyncCallback,System.Object)" />), but until the code executes the corresponding <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" /> method call, it must not execute any other calls that start a synchronous or asynchronous execution against the same <see cref="T:System.Data.SqlClient.SqlCommand" /> object. Calling the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" /> before the command's execution is completed causes the <see cref="T:System.Data.SqlClient.SqlCommand" /> object to block until the execution is finished.</para>
- <para>The <paramref name="callback" /> parameter lets you specify an <see cref="T:System.AsyncCallback" /> delegate that is called when the statement has completed. You can call the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" /> method from within this delegate procedure, or from any other location within your application. In addition, you can pass any object in the <paramref name="asyncStateObject" /> parameter, and your callback procedure can retrieve this information using the <see cref="P:System.IAsyncResult.AsyncState" /> property.</para>
- <para>Note that the command text and parameters are sent to the server synchronously. If a large command or many parameters are sent, this method may block during writes. After the command is sent, the method returns immediately without waiting for an answer from the server--that is, reads are asynchronous.</para>
- <para>Because the callback procedure executes from within a background thread supplied by the Microsoft .NET common language runtime, it is very important that you take a rigorous approach to handling cross-thread interactions from within your applications. For example, you must not interact with a form's contents from within your callback procedure; should you have to update the form, you must switch back to the form's thread in order to do your work. The example in this topic demonstrates this behavior.</para>
- <para>All errors that occur during the execution of the operation are thrown as exceptions in the callback procedure. You must handle the exception in the callback procedure, not in the main application. See the example in this topic for additional information on handling exceptions in the callback procedure.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this <see cref="T:System.Data.SqlClient.SqlCommand" />, given a callback procedure and state information.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>An <see cref="T:System.IAsyncResult" /> that can be used to poll or wait for results, or both; this value is also needed when invoking <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" />, which returns the number of affected rows.</para>
- </returns>
- <param name="callback">
- <attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.AsyncCallback" /> delegate that is invoked when the command's execution has completed. Pass null (Nothing in Microsoft Visual Basic) to indicate that no callback is required.</param>
- <param name="stateObject">
- <attribution license="cc4" from="Microsoft" modified="false" />A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the <see cref="P:System.IAsyncResult.AsyncState" /> property.</param>
- </Docs>
- </Member>
- <Member MemberName="BeginExecuteReader">
- <MemberSignature Language="C#" Value="public IAsyncResult BeginExecuteReader ();" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.IAsyncResult</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> method starts the process of asynchronously executing a Transact-SQL statement or stored procedure that returns rows, so that other tasks can run concurrently while the statement is executing. When the statement has completed, developers must call the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> method to finish the operation and retrieve the <see cref="T:System.Data.SqlClient.SqlDataReader" /> returned by the command. The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> method returns immediately, but until the code executes the corresponding <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> method call, it must not execute any other calls that start a synchronous or asynchronous execution against the same <see cref="T:System.Data.SqlClient.SqlCommand" /> object. Calling the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> before the command's execution is completed causes the <see cref="T:System.Data.SqlClient.SqlCommand" /> object to block until the execution is finished.</para>
- <para>Note that the command text and parameters are sent to the server synchronously. If a large command or many parameters are sent, this method may block during writes. After the command is sent, the method returns immediately without waiting for an answer from the server--that is, reads are asynchronous. Although command execution is asynchronous, value fetching is still synchronous. This means that calls to <see cref="M:System.Data.SqlClient.SqlDataReader.Read" /> may block if more data is required and the underlying network's read operation blocks.</para>
- <para>Because this overload does not support a callback procedure, developers must either poll to determine whether the command has completed, using the <see cref="P:System.IAsyncResult.IsCompleted" /> property of the <see cref="T:System.IAsyncResult" /> returned by the <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> method; or wait for the completion of one or more commands using the <see cref="P:System.IAsyncResult.AsyncWaitHandle" /> property of the returned <see cref="T:System.IAsyncResult" />.</para>
- <para>If you use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" /> or <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> to access XML data, SQL Server will return any XML results greater than 2,033 characters in length in multiple rows of 2,033 characters each. To avoid this behavior, use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteXmlReader" /> or <see cref="Overload:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> to read FOR XML queries. For more information, see article Q310378, "PRB: XML Data Is Truncated When You Use SqlDataReader," in the Microsoft Knowledge Base at http://support.microsoft.com.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this <see cref="T:System.Data.SqlClient.SqlCommand" />, and retrieves one or more result sets from the server.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>An <see cref="T:System.IAsyncResult" /> that can be used to poll or wait for results, or both; this value is also needed when invoking <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" />, which returns a <see cref="T:System.Data.SqlClient.SqlDataReader" /> instance that can be used to retrieve the returned rows.</para>
- </returns>
- </Docs>
- </Member>
- <Member MemberName="BeginExecuteReader">
- <MemberSignature Language="C#" Value="public IAsyncResult BeginExecuteReader (System.Data.CommandBehavior behavior);" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.IAsyncResult</ReturnType>
- </ReturnValue>
- <Parameters>
- <Parameter Name="behavior" Type="System.Data.CommandBehavior" />
- </Parameters>
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> method starts the process of asynchronously executing a Transact-SQL statement or stored procedure that returns rows, so that other tasks can run concurrently while the statement is executing. When the statement has completed, developers must call the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> method to finish the operation and retrieve the <see cref="T:System.Data.SqlClient.SqlDataReader" /> returned by the command. The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> method returns immediately, but until the code executes the corresponding <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> method call, it must not execute any other calls that start a synchronous or asynchronous execution against the same <see cref="T:System.Data.SqlClient.SqlCommand" /> object. Calling the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> before the command's execution is completed causes the <see cref="T:System.Data.SqlClient.SqlCommand" /> object to block until the execution is finished.</para>
- <para>The <paramref name="behavior" /> parameter lets you specify options that control the behavior of the command and its connection. These values can be combined together (using the programming language's OR operator); generally, developers use the CommandBehavior.CloseConnection value to make sure that the connection is closed by the runtime when the <see cref="T:System.Data.SqlClient.SqlDataReader" /> is closed. </para>
- <para>Note that the command text and parameters are sent to the server synchronously. If a large command or many parameters are sent, this method may block during writes. After the command is sent, the method returns immediately without waiting for an answer from the server--that is, reads are asynchronous. Although command execution is asynchronous, value fetching is still synchronous. This means that calls to <see cref="M:System.Data.SqlClient.SqlDataReader.Read" /> may block if more data is required and the underlying network's read operation blocks.</para>
- <para>Because this overload does not support a callback procedure, developers must either poll to determine whether the command has completed, using the <see cref="P:System.IAsyncResult.IsCompleted" /> property of the <see cref="T:System.IAsyncResult" /> returned by the <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" /> method; or wait for the completion of one or more commands using the <see cref="P:System.IAsyncResult.AsyncWaitHandle" /> property of the returned <see cref="T:System.IAsyncResult" />.</para>
- <para>If you use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" /> or <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> to access XML data, SQL Server returns any XML results greater than 2,033 characters in length in multiple rows of 2,033 characters each. To avoid this behavior, use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteXmlReader" /> or <see cref="Overload:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> to read FOR XML queries. For more information, see article Q310378, "PRB: XML Data Is Truncated When You Use SqlDataReader," in the Microsoft Knowledge Base at http://support.microsoft.com.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this <see cref="T:System.Data.SqlClient.SqlCommand" /> using one of the <see cref="T:System.Data.CommandBehavior" /> values.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>An <see cref="T:System.IAsyncResult" /> that can be used to poll, wait for results, or both; this value is also needed when invoking <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" />, which returns a <see cref="T:System.Data.SqlClient.SqlDataReader" /> instance that can be used to retrieve the returned rows.</para>
- </returns>
- <param name="behavior">
- <attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Data.CommandBehavior" /> values, indicating options for statement execution and data retrieval.</param>
- </Docs>
- </Member>
- <Member MemberName="BeginExecuteReader">
- <MemberSignature Language="C#" Value="public IAsyncResult BeginExecuteReader (AsyncCallback callback, object stateObject);" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.IAsyncResult</ReturnType>
- </ReturnValue>
- <Parameters>
- <Parameter Name="callback" Type="System.AsyncCallback" />
- <Parameter Name="stateObject" Type="System.Object" />
- </Parameters>
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> method starts the process of asynchronously executing a Transact-SQL statement or stored procedure that returns rows, so that other tasks can run concurrently while the statement is executing. When the statement has completed, developers must call the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> method to finish the operation and retrieve the <see cref="T:System.Data.SqlClient.SqlDataReader" /> returned by the command. The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> method returns immediately, but until the code executes the corresponding <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> method call, it must not execute any other calls that start a synchronous or asynchronous execution against the same <see cref="T:System.Data.SqlClient.SqlCommand" /> object. Calling the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> before the command's execution is completed cause the <see cref="T:System.Data.SqlClient.SqlCommand" /> object to block until the execution is finished.</para>
- <para>The <paramref name="callback" /> parameter lets you specify an <see cref="T:System.AsyncCallback" /> delegate that is called when the statement has completed. You can call the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> method from within this delegate procedure, or from any other location within your application. In addition, you can pass any object in the <paramref name="stateObject" /> parameter, and your callback procedure can retrieve this information using the <see cref="P:System.IAsyncResult.AsyncState" /> property.</para>
- <para>Note that the command text and parameters are sent to the server synchronously. If a large command or many parameters are sent, this method may block during writes. After the command is sent, the method returns immediately without waiting for an answer from the server--that is, reads are asynchronous. Although command execution is asynchronous, value fetching is still synchronous. This means that calls to <see cref="M:System.Data.SqlClient.SqlDataReader.Read" /> may block if more data is required and the underlying network's read operation blocks.</para>
- <para>Because the callback procedure executes from within a background thread supplied by the Microsoft .NET runtime, it is very important that you take a rigorous approach to handling cross-thread interactions from within your applications. For example, you must not interact with a form's contents from within your callback procedure; should you have to update the form, you must switch back to the form's thread in order to do your work. The example in this topic demonstrates this behavior.</para>
- <para>All errors that occur during the execution of the operation are thrown as exceptions in the callback procedure. You must handle the exception in the callback procedure, not in the main application. See the example in this topic for additional information on handling exceptions in the callback procedure.</para>
- <para>If you use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" /> or <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> to access XML data, SQL Server returns any XML results greater than 2,033 characters in length in multiple rows of 2,033 characters each. To avoid this behavior, use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteXmlReader" /> or <see cref="Overload:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> to read FOR XML queries. For more information, see article Q310378, "PRB: XML Data Is Truncated When You Use SqlDataReader," in the Microsoft Knowledge Base at http://support.microsoft.com.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this <see cref="T:System.Data.SqlClient.SqlCommand" /> and retrieves one or more result sets from the server, given a callback procedure and state information.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>An <see cref="T:System.IAsyncResult" /> that can be used to poll, wait for results, or both; this value is also needed when invoking <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" />, which returns a <see cref="T:System.Data.SqlClient.SqlDataReader" /> instance which can be used to retrieve the returned rows.</para>
- </returns>
- <param name="callback">
- <attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.AsyncCallback" /> delegate that is invoked when the command's execution has completed. Pass null (Nothing in Microsoft Visual Basic) to indicate that no callback is required.</param>
- <param name="stateObject">
- <attribution license="cc4" from="Microsoft" modified="false" />A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the <see cref="P:System.IAsyncResult.AsyncState" /> property.</param>
- </Docs>
- </Member>
- <Member MemberName="BeginExecuteReader">
- <MemberSignature Language="C#" Value="public IAsyncResult BeginExecuteReader (AsyncCallback callback, object stateObject, System.Data.CommandBehavior behavior);" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.IAsyncResult</ReturnType>
- </ReturnValue>
- <Parameters>
- <Parameter Name="callback" Type="System.AsyncCallback" />
- <Parameter Name="stateObject" Type="System.Object" />
- <Parameter Name="behavior" Type="System.Data.CommandBehavior" />
- </Parameters>
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> method starts the process of asynchronously executing a Transact-SQL statement or stored procedure that returns rows, so that other tasks can run concurrently while the statement is executing. When the statement has completed, developers must call the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> method to finish the operation and retrieve the <see cref="T:System.Data.SqlClient.SqlDataReader" /> returned by the command. The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> method returns immediately, but until the code executes the corresponding <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> method call, it must not execute any other calls that start a synchronous or asynchronous execution against the same <see cref="T:System.Data.SqlClient.SqlCommand" /> object. Calling the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> before the command's execution is completed causes the <see cref="T:System.Data.SqlClient.SqlCommand" /> object to block until the execution is finished.</para>
- <para>The <paramref name="callback" /> parameter lets you specify an <see cref="T:System.AsyncCallback" /> delegate that is called when the statement has completed. You can call the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> method from within this delegate procedure, or from any other location within your application. In addition, you can pass any object in the <paramref name="stateObject" /> parameter, and your callback procedure can retrieve this information using the <see cref="P:System.IAsyncResult.AsyncState" /> property.</para>
- <para>The <paramref name="behavior" /> parameter lets you specify options that control the behavior of the command and its connection. These values can be combined together (using the programming language's Or operator); generally, developers use the CloseConnection value to make sure that the connection is closed by the runtime when the <see cref="T:System.Data.SqlClient.SqlDataReader" /> is closed. Developers can also optimize the behavior of the <see cref="T:System.Data.SqlClient.SqlDataReader" /> by specifying the SingleRow value when it is known in advance that the Transact-SQL statement or stored procedure only returns a single row.</para>
- <para>Note that the command text and parameters are sent to the server synchronously. If a large command or many parameters are sent, this method may block during writes. After the command is sent, the method returns immediately without waiting for an answer from the server--that is, reads are asynchronous. Although command execution is asynchronous, value fetching is still synchronous. This means that calls to <see cref="M:System.Data.SqlClient.SqlDataReader.Read" /> may block if more data is required and the underlying network's read operation blocks.</para>
- <para>Because the callback procedure executes from within a background thread supplied by the Microsoft .NET common language runtime, it is very important that you take a rigorous approach to handling cross-thread interactions from within your applications. For example, you must not interact with a form's contents from within your callback procedure--should you have to update the form, you must switch back to the form's thread in order to do your work. The example in this topic demonstrates this behavior.</para>
- <para>All errors that occur during the execution of the operation are thrown as exceptions in the callback procedure. You must handle the exception in the callback procedure, not in the main application. See the example in this topic for additional information on handling exceptions in the callback procedure.</para>
- <para>If you use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" /> or <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> to access XML data, SQL Server will return any XML results greater than 2,033 characters in length in multiple rows of 2,033 characters each. To avoid this behavior, use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteXmlReader" /> or <see cref="Overload:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> to read FOR XML queries. For more information, see article Q310378, "PRB: XML Data Is Truncated When You Use SqlDataReader," in the Microsoft Knowledge Base at http://support.microsoft.com.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this <see cref="T:System.Data.SqlClient.SqlCommand" />, using one of the CommandBehavior values, and retrieving one or more result sets from the server, given a callback procedure and state information. </para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>An <see cref="T:System.IAsyncResult" /> that can be used to poll or wait for results, or both; this value is also needed when invoking <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" />, which returns a <see cref="T:System.Data.SqlClient.SqlDataReader" /> instance which can be used to retrieve the returned rows.</para>
- </returns>
- <param name="callback">
- <attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.AsyncCallback" /> delegate that is invoked when the command's execution has completed. Pass null (Nothing in Microsoft Visual Basic) to indicate that no callback is required.</param>
- <param name="stateObject">
- <attribution license="cc4" from="Microsoft" modified="false" />A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the <see cref="P:System.IAsyncResult.AsyncState" /> property.</param>
- <param name="behavior">
- <attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Data.CommandBehavior" /> values, indicating options for statement execution and data retrieval.</param>
- </Docs>
- </Member>
- <Member MemberName="BeginExecuteXmlReader">
- <MemberSignature Language="C#" Value="public IAsyncResult BeginExecuteXmlReader ();" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.IAsyncResult</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> method starts the process of asynchronously executing a Transact-SQL statement that returns rows as XML, so that other tasks can run concurrently while the statement is executing. When the statement has completed, developers must call the EndExecuteXmlReader method to finish the operation and retrieve the XML returned by the command. The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> method returns immediately, but until the code executes the corresponding EndExecuteXmlReader method call, it must not execute any other calls that start a synchronous or asynchronous execution against the same <see cref="T:System.Data.SqlClient.SqlCommand" /> object. Calling the EndExecuteXmlReader before the command's execution is completed causes the <see cref="T:System.Data.SqlClient.SqlCommand" /> object to block until the execution is finished.</para>
- <para>The <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> property ordinarily specifies a Transact-SQL statement with a valid FOR XML clause. However, CommandText can also specify a statement that returns ntext data that contains valid XML.</para>
- <para>A typical <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader(System.AsyncCallback,System.Object)" /> query can be formatted as in the following C# example:</para>
- <code>SqlCommand command = new SqlCommand("SELECT ContactID, FirstName, LastName FROM dbo.Contact FOR XML AUTO, XMLDATA", SqlConn);</code>
- <para>This method can also be used to retrieve a single-row, single-column result set. In this case, if more than one row is returned, the EndExecuteXmlReader method attaches the <see cref="T:System.Xml.XmlReader" /> to the value on the first row, and discards the rest of the result set.</para>
- <para>The multiple active result set (MARS) feature lets multiple actions use the same connection.</para>
- <para>Note that the command text and parameters are sent to the server synchronously. If a large command or many parameters are sent, this method may block during writes. After the command is sent, the method returns immediately without waiting for an answer from the server--that is, reads are asynchronous. Although command execution is asynchronous, value fetching is still synchronous.</para>
- <para>Because this overload does not support a callback procedure, developers need to either poll to determine whether the command has completed, using the <see cref="P:System.IAsyncResult.IsCompleted" /> property of the <see cref="T:System.IAsyncResult" /> returned by the <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> method; or wait for the completion of one or more commands using the <see cref="P:System.IAsyncResult.AsyncWaitHandle" /> property of the returned <see cref="T:System.IAsyncResult" />.</para>
- <para>If you use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" /> or <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> to access XML data, SQL Server returns any XML results greater than 2,033 characters in length in multiple rows of 2,033 characters each. To avoid this behavior, use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteXmlReader" /> or <see cref="Overload:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> to read FOR XML queries. For more information, see article Q310378, "PRB: XML Data Is Truncated When You Use SqlDataReader," in the Microsoft Knowledge Base at http://support.microsoft.com.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this <see cref="T:System.Data.SqlClient.SqlCommand" /> and returns results as an <see cref="T:System.Xml.XmlReader" /> object.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>An <see cref="T:System.IAsyncResult" /> that can be used to poll or wait for results, or both; this value is also needed when invoking EndExecuteXmlReader, which returns a single XML value.</para>
- </returns>
- </Docs>
- </Member>
- <Member MemberName="BeginExecuteXmlReader">
- <MemberSignature Language="C#" Value="public IAsyncResult BeginExecuteXmlReader (AsyncCallback callback, object stateObject);" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.IAsyncResult</ReturnType>
- </ReturnValue>
- <Parameters>
- <Parameter Name="callback" Type="System.AsyncCallback" />
- <Parameter Name="stateObject" Type="System.Object" />
- </Parameters>
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> method starts the process of asynchronously executing a Transact-SQL statement or stored procedure that returns rows as XML, so that other tasks can run concurrently while the statement is executing. When the statement has completed, developers must call the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)" /> method to finish the operation and retrieve the requested XML data. The <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> method returns immediately, but until the code executes the corresponding <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)" /> method call, it must not execute any other calls that start a synchronous or asynchronous execution against the same <see cref="T:System.Data.SqlClient.SqlCommand" /> object. Calling the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)" /> before the command's execution is completed causes the <see cref="T:System.Data.SqlClient.SqlCommand" /> object to block until the execution is finished.</para>
- <para>The <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> property ordinarily specifies a Transact-SQL statement with a valid FOR XML clause. However, CommandText can also specify a statement that returns data that contains valid XML. This method can also be used to retrieve a single-row, single-column result set. In this case, if more than one row is returned, the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)" /> method attaches the <see cref="T:System.Xml.XmlReader" /> to the value on the first row, and discards the rest of the result set.</para>
- <para>A typical <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader(System.AsyncCallback,System.Object)" /> query can be formatted as in the following C# example:</para>
- <code>SqlCommand command = new SqlCommand("SELECT ContactID, FirstName, LastName FROM Contact FOR XML AUTO, XMLDATA", SqlConn);</code>
- <para>This method can also be used to retrieve a single-row, single-column result set. In this case, if more than one row is returned, the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)" /> method attaches the <see cref="T:System.Xml.XmlReader" /> to the value on the first row, and discards the rest of the result set.</para>
- <para>The multiple active result set (MARS) feature lets multiple actions use the same connection.</para>
- <para>The <paramref name="callback" /> parameter lets you specify an <see cref="T:System.AsyncCallback" /> delegate that is called when the statement has completed. You can call the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)" /> method from within this delegate procedure, or from any other location within your application. In addition, you can pass any object in the <paramref name="stateObject" /> parameter, and your callback procedure can retrieve this information using the <see cref="P:System.IAsyncResult.AsyncState" /> property.</para>
- <para>Note that the command text and parameters are sent to the server synchronously. If a large command or many parameters is sent, this method may block during writes. After the command is sent, the method returns immediately without waiting for an answer from the server--that is, reads are asynchronous. </para>
- <para>All errors that occur during the execution of the operation are thrown as exceptions in the callback procedure. You must handle the exception in the callback procedure, not in the main application. See the example in this topic for additional information on handling exceptions in the callback procedure.</para>
- <para>If you use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" /> or <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> to access XML data, SQL Server will return any XML results greater than 2,033 characters in length in multiple rows of 2,033 characters each. To avoid this behavior, use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteXmlReader" /> or <see cref="Overload:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> to read FOR XML queries. For more information, see article Q310378, "PRB: XML Data Is Truncated When You Use SqlDataReader," in the Microsoft Knowledge Base at http://support.microsoft.com.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this <see cref="T:System.Data.SqlClient.SqlCommand" /> and returns results as an <see cref="T:System.Xml.XmlReader" /> object, using a callback procedure.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>An <see cref="T:System.IAsyncResult" /> that can be used to poll, wait for results, or both; this value is also needed when the <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)" /> is called, which returns the results of the command as XML.</para>
- </returns>
- <param name="callback">
- <attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.AsyncCallback" /> delegate that is invoked when the command's execution has completed. Pass null (Nothing in Microsoft Visual Basic) to indicate that no callback is required.</param>
- <param name="stateObject">
- <attribution license="cc4" from="Microsoft" modified="false" />A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the <see cref="P:System.IAsyncResult.AsyncState" /> property.</param>
- </Docs>
- </Member>
- <Member MemberName="Cancel">
- <MemberSignature Language="C#" Value="public override void Cancel ();" />
- <MemberType>Method</MemberType>
- <ReturnValue>
- <ReturnType>System.Void</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>If there is nothing to cancel, nothing occurs. However, if there is a command in process, and the attempt to cancel fails, no exception is generated. </para>
- <para>In some, rare, cases, if you call <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" /> then call <see cref="M:System.Data.SqlClient.SqlDataReader.Close" /> (implicitily or explicitly) before calling <see cref="M:System.Data.SqlClient.SqlCommand.Cancel" />, and then call <see cref="M:System.Data.SqlClient.SqlCommand.Cancel" />, the cancel command will not be sent to SQL Server and the result set can continue to stream after you call <see cref="M:System.Data.SqlClient.SqlConnection.Close" />. To avoid this, make sure that you call <see cref="M:System.Data.SqlClient.SqlCommand.Cancel" /> before closing the reader or connection.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Tries to cancel the execution of a <see cref="T:System.Data.SqlClient.SqlCommand" />.</para>
- </summary>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- </Member>
- <Member MemberName="Clone">
- <MemberSignature Language="C#" Value="public System.Data.SqlClient.SqlCommand Clone ();" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Data.SqlClient.SqlCommand</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>To be added.</remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Creates a new <see cref="T:System.Data.SqlClient.SqlCommand" /> object that is a copy of the current instance.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>A new <see cref="T:System.Data.SqlClient.SqlCommand" /> object that is a copy of this instance.</para>
- </returns>
- </Docs>
- </Member>
- <Member MemberName="CommandText">
- <MemberSignature Language="C#" Value="public override string CommandText { set; get; }" />
- <MemberType>Property</MemberType>
- <ReturnValue>
- <ReturnType>System.String</ReturnType>
- </ReturnValue>
- <Parameters>
- </Parameters>
- <Docs>
- <value>To be added: an object of type 'string'</value>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>When the <see cref="P:System.Data.SqlClient.SqlCommand.CommandType" /> property is set to StoredProcedure, the <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> property should be set to the name of the stored procedure. The user may be required to use escape character syntax if the stored procedure name contains any special characters. The command executes this stored procedure when you call one of the Execute methods.</para>
- <para>The Microsoft .NET Framework Data Provider for SQL Server does not support the question mark (?) placeholder for passing parameters to a Transact-SQL statement or a stored procedure called by a command of CommandType.Text. In this case, named parameters must be used. For example: </para>
- <code> SELECT * FROM dbo.Customers WHERE CustomerID = @CustomerID</code>
- <para>For more information, see <format type="text/html"><a href="537d8a2c-d40b-4000-83eb-bc1fcc93f707">Using Stored Procedures with a Command</a></format>.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Gets or sets the Transact-SQL statement, table name or stored procedure to execute at the data source.</para>
- </summary>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <Attributes>
- <Attribute>
- <AttributeName>System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)</AttributeName>
- </Attribute>
- <Attribute>
- <AttributeName>System.ComponentModel.Editor("Microsoft.VSDesigner.Data.SQL.Design.SqlCommandTextEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
- </Attribute>
- <Attribute>
- <AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
- </Attribute>
- </Attributes>
- </Member>
- <Member MemberName="CommandTimeout">
- <MemberSignature Language="C#" Value="public override int CommandTimeout { set; get; }" />
- <MemberType>Property</MemberType>
- <ReturnValue>
- <ReturnType>System.Int32</ReturnType>
- </ReturnValue>
- <Parameters>
- </Parameters>
- <Docs>
- <value>Current value in seconds.</value>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>A value of 0 indicates no limit (an attempt to execute a command will wait indefinitely).</para>
- <block subset="none" type="note">
- <para>The <see cref="P:System.Data.SqlClient.SqlCommand.CommandTimeout" /> property will be ignored during asynchronous method calls such as <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" />.</para>
- </block>
- <para>
- <see cref="P:System.Data.SqlClient.SqlCommand.CommandTimeout" /> has no effect when the command is executed against a context connection (a <see cref="T:System.Data.SqlClient.SqlConnection" /> opened with "context connection=true" in the connection string).</para>
- <block subset="none" type="note">
- <para>This property is the cumulative time-out (for all network packets that are read during the invocation of a method) for all network reads during command execution or processing of the results. A time-out can still occur after the first row is returned, and does not include user processing time, only network read time.</para>
- <para>For example, with a 30 second time out, if <see cref="M:System.Data.SqlClient.SqlDataReader.Read" /> requires two network packets, then it has 30 seconds to read both network packets. If you call <see cref="M:System.Data.SqlClient.SqlDataReader.Read" /> again, it will have another 30 seconds to read any data that it requires.</para>
- </block>
- <code>using System;
- using System.Data.SqlClient;
- ///
- public class A {
- ///
- public static void Main() {
- string connectionString = "";
- // Wait for 5 second delay in the command
- string queryString = "waitfor delay '00:00:05'";
- using (SqlConnection connection = new SqlConnection(connectionString)) {
- connection.Open();
- SqlCommand command = new SqlCommand(queryString, connection);
- // Setting command timeout to 1 second
- command.CommandTimeout = 1;
- try {
- command.ExecuteNonQuery();
- }
- catch (SqlException e) {
- Console.WriteLine("Got expected SqlException due to command timeout ");
- Console.WriteLine(e);
- }
- }
- }
- }</code>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Gets or sets the wait time before terminating the attempt to execute a command and generating an error.</para>
- </summary>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- </Member>
- <Member MemberName="CommandType">
- <MemberSignature Language="C#" Value="public override System.Data.CommandType CommandType { set; get; }" />
- <MemberType>Property</MemberType>
- <ReturnValue>
- <ReturnType>System.Data.CommandType</ReturnType>
- </ReturnValue>
- <Parameters>
- </Parameters>
- <Docs>
- <value>To be added: an object of type 'Data.CommandType'</value>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>When you set the <see cref="P:System.Data.SqlClient.SqlCommand.CommandType" /> property to StoredProcedure, you should set the <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> property to the name of the stored procedure. The command executes this stored procedure when you call one of the Execute methods.</para>
- <para>The Microsoft .NET Framework Data Provider for SQL Server does not support the question mark (?) placeholder for passing parameters to a SQL Statement or a stored procedure called with a <see cref="P:System.Data.SqlClient.SqlCommand.CommandType" /> of <see cref="F:System.Data.CommandType.Text" />. In this case, named parameters must be used. For example: </para>
- <para>SELECT * FROM Customers WHERE CustomerID = @CustomerID </para>
- <para>For more information, see <format type="text/html"><a href="537d8a2c-d40b-4000-83eb-bc1fcc93f707">Using Stored Procedures with a Command</a></format>.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Gets or sets a value indicating how the <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> property is to be interpreted.</para>
- </summary>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <Attributes>
- <Attribute>
- <AttributeName>System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)</AttributeName>
- </Attribute>
- <Attribute>
- <AttributeName>System.ComponentModel.DefaultValue(System.Data.CommandType.Text)</AttributeName>
- </Attribute>
- </Attributes>
- </Member>
- <Member MemberName="Connection">
- <MemberSignature Language="C#" Value="public System.Data.SqlClient.SqlConnection Connection { set; get; }" />
- <MemberType>Property</MemberType>
- <ReturnValue>
- <ReturnType>System.Data.SqlClient.SqlConnection</ReturnType>
- </ReturnValue>
- <Parameters>
- </Parameters>
- <Docs>
- <value>To be added: an object of type 'SqlConnection'</value>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>If the command is enlisted in an existing transaction, and the connection is changed, trying to execute the command will throw an <see cref="T:System.InvalidOperationException" />.</para>
- <para>If the <see cref="P:System.Data.SqlClient.SqlCommand.Transaction" /> property is not null and the transaction has already been committed or rolled back, <see cref="P:System.Data.SqlClient.SqlCommand.Transaction" /> is set to null.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Gets or sets the <see cref="T:System.Data.SqlClient.SqlConnection" /> used by this instance of the <see cref="T:System.Data.SqlClient.SqlCommand" />.</para>
- </summary>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <Attributes>
- <Attribute>
- <AttributeName>System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DbConnectionEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
- </Attribute>
- <Attribute>
- <AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
- </Attribute>
- </Attributes>
- </Member>
- <Member MemberName="CreateDbParameter">
- <MemberSignature Language="C#" Value="protected override System.Data.Common.DbParameter CreateDbParameter ();" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Data.Common.DbParameter</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <summary>To be added.</summary>
- <returns>To be added.</returns>
- <remarks>To be added.</remarks>
- </Docs>
- </Member>
- <Member MemberName="CreateParameter">
- <MemberSignature Language="C#" Value="public System.Data.SqlClient.SqlParameter CreateParameter ();" />
- <MemberType>Method</MemberType>
- <ReturnValue>
- <ReturnType>System.Data.SqlClient.SqlParameter</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The <see cref="M:System.Data.SqlClient.SqlCommand.CreateParameter" /> method is a strongly-typed version of <see cref="M:System.Data.IDbCommand.CreateParameter" />.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Creates a new instance of a <see cref="T:System.Data.SqlClient.SqlParameter" /> object.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>A <see cref="T:System.Data.SqlClient.SqlParameter" /> object.</para>
- </returns>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- </Member>
- <Member MemberName="DbConnection">
- <MemberSignature Language="C#" Value="protected override System.Data.Common.DbConnection DbConnection { set; get; }" />
- <MemberType>Property</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Data.Common.DbConnection</ReturnType>
- </ReturnValue>
- <Docs>
- <summary>To be added.</summary>
- <value>To be added.</value>
- <remarks>To be added.</remarks>
- </Docs>
- </Member>
- <Member MemberName="DbParameterCollection">
- <MemberSignature Language="C#" Value="protected override System.Data.Common.DbParameterCollection DbParameterCollection { get; }" />
- <MemberType>Property</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Data.Common.DbParameterCollection</ReturnType>
- </ReturnValue>
- <Docs>
- <summary>To be added.</summary>
- <value>To be added.</value>
- <remarks>To be added.</remarks>
- </Docs>
- </Member>
- <Member MemberName="DbTransaction">
- <MemberSignature Language="C#" Value="protected override System.Data.Common.DbTransaction DbTransaction { set; get; }" />
- <MemberType>Property</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Data.Common.DbTransaction</ReturnType>
- </ReturnValue>
- <Docs>
- <summary>To be added.</summary>
- <value>To be added.</value>
- <remarks>To be added.</remarks>
- </Docs>
- </Member>
- <Member MemberName="DesignTimeVisible">
- <MemberSignature Language="C#" Value="public override bool DesignTimeVisible { set; get; }" />
- <MemberType>Property</MemberType>
- <ReturnValue>
- <ReturnType>System.Boolean</ReturnType>
- </ReturnValue>
- <Parameters>
- </Parameters>
- <Docs>
- <value>To be added: an object of type 'bool'</value>
- <remarks>To be added</remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Gets or sets a value indicating whether the command object should be visible in a Windows Form Designer control.</para>
- </summary>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <Attributes>
- <Attribute>
- <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
- </Attribute>
- <Attribute>
- <AttributeName>System.ComponentModel.DesignOnly(true)</AttributeName>
- </Attribute>
- <Attribute>
- <AttributeName>System.ComponentModel.DefaultValue(true)</AttributeName>
- </Attribute>
- <Attribute>
- <AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
- </Attribute>
- </Attributes>
- </Member>
- <Member MemberName="Dispose">
- <MemberSignature Language="C#" Value="protected override void Dispose (bool disposing);" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Void</ReturnType>
- </ReturnValue>
- <Parameters>
- <Parameter Name="disposing" Type="System.Boolean" />
- </Parameters>
- <Docs>
- <param name="disposing">To be added.</param>
- <summary>To be added.</summary>
- <remarks>To be added.</remarks>
- </Docs>
- </Member>
- <Member MemberName="EndExecuteNonQuery">
- <MemberSignature Language="C#" Value="public int EndExecuteNonQuery (IAsyncResult asyncResult);" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Int32</ReturnType>
- </ReturnValue>
- <Parameters>
- <Parameter Name="asyncResult" Type="System.IAsyncResult" />
- </Parameters>
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>When you call <see cref="Overload:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" /> to execute a tsql statement, you must call <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)" /> in order to complete the operation. If the process of executing the command has not yet finished, this method blocks until the operation is complete. Users can verify that the command has completed its operation by using the <see cref="T:System.IAsyncResult" /> instance returned by the <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" /> method. If a callback procedure was specified in the call to <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" />, this method must be called.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Finishes asynchronous execution of a Transact-SQL statement.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The number of rows affected (the same behavior as <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteNonQuery" />).</para>
- </returns>
- <param name="asyncResult">
- <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.IAsyncResult" /> returned by the call to <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery" />.</param>
- </Docs>
- </Member>
- <Member MemberName="EndExecuteReader">
- <MemberSignature Language="C#" Value="public System.Data.SqlClient.SqlDataReader EndExecuteReader (IAsyncResult asyncResult);" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Data.SqlClient.SqlDataReader</ReturnType>
- </ReturnValue>
- <Parameters>
- <Parameter Name="asyncResult" Type="System.IAsyncResult" />
- </Parameters>
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>When you call <see cref="Overload:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> to execute a Transact-SQL statement, you must call <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)" /> in order to complete the operation. If the process of executing the command has not yet finished, this method blocks until the operation is complete. Users can verify that the command has completed its operation by using the <see cref="T:System.IAsyncResult" /> instance returned by the <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> method. If a callback procedure was specified in the call to <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" />, this method must be called.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Finishes asynchronous execution of a Transact-SQL statement, returning the requested <see cref="T:System.Data.SqlClient.SqlDataReader" />.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>A <see cref="T:System.Data.SqlClient.SqlDataReader" /> object that can be used to retrieve the requested rows.</para>
- </returns>
- <param name="asyncResult">
- <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.IAsyncResult" /> returned by the call to <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" />.</param>
- </Docs>
- </Member>
- <Member MemberName="EndExecuteXmlReader">
- <MemberSignature Language="C#" Value="public System.Xml.XmlReader EndExecuteXmlReader (IAsyncResult asyncResult);" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Xml.XmlReader</ReturnType>
- </ReturnValue>
- <Parameters>
- <Parameter Name="asyncResult" Type="System.IAsyncResult" />
- </Parameters>
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>When you call <see cref="Overload:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> to execute a Transact-SQL statement, you must call <see cref="M:System.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)" /> in order to complete the operation. If the process of executing the command has not yet finished, this method blocks until the operation is complete. Users can verify that the command has completed its operation by using the <see cref="T:System.IAsyncResult" /> instance returned by the <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> method. If a callback procedure was specified in the call to <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" />, this method must be called.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Finishes asynchronous execution of a Transact-SQL statement, returning the requested data as XML.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>An <see cref="T:System.Xml.XmlReader" /> object that can be used to fetch the resulting XML data.</para>
- </returns>
- <param name="asyncResult">
- <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.IAsyncResult" /> returned by the call to <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" />.</param>
- </Docs>
- </Member>
- <Member MemberName="ExecuteDbDataReader">
- <MemberSignature Language="C#" Value="protected override System.Data.Common.DbDataReader ExecuteDbDataReader (System.Data.CommandBehavior behavior);" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Data.Common.DbDataReader</ReturnType>
- </ReturnValue>
- <Parameters>
- <Parameter Name="behavior" Type="System.Data.CommandBehavior" />
- </Parameters>
- <Docs>
- <param name="behavior">To be added.</param>
- <summary>To be added.</summary>
- <returns>To be added.</returns>
- <remarks>To be added.</remarks>
- </Docs>
- </Member>
- <Member MemberName="ExecuteNonQuery">
- <MemberSignature Language="C#" Value="public override int ExecuteNonQuery ();" />
- <MemberType>Method</MemberType>
- <ReturnValue>
- <ReturnType>System.Int32</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>You can use the <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteNonQuery" /> to perform catalog operations (for example, querying the structure of a database or creating database objects such as tables), or to change the data in a database without using a <see cref="T:System.Data.DataSet" /> by executing UPDATE, INSERT, or DELETE statements.</para>
- <para>Although the <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteNonQuery" /> returns no rows, any output parameters or return values mapped to parameters are populated with data.</para>
- <para>For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. When a trigger exists on a table being inserted or updated, the return value includes the number of rows affected by both the insert or update operation and the number of rows affected by the trigger or triggers. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Executes a Transact-SQL statement against the connection and returns the number of rows affected.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The number of rows affected.</para>
- </returns>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- </Member>
- <Member MemberName="ExecuteReader">
- <MemberSignature Language="C#" Value="public System.Data.SqlClient.SqlDataReader ExecuteReader ();" />
- <MemberType>Method</MemberType>
- <ReturnValue>
- <ReturnType>System.Data.SqlClient.SqlDataReader</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>When the <see cref="P:System.Data.SqlClient.SqlCommand.CommandType" /> property is set to StoredProcedure, the <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> property should be set to the name of the stored procedure. The command executes this stored procedure when you call <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" />.</para>
- <block subset="none" type="note">
- <para>If a transaction is deadlocked, an exception may not be thrown until <see cref="M:System.Data.SqlClient.SqlDataReader.Read" /> is called.</para>
- </block>
- <para>The multiple active result set (MARS) feature allows for multiple actions using the same connection.</para>
- <para>If you use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" /> or <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> to access XML data, SQL Server will return any XML results greater than 2,033 characters in length in multiple rows of 2,033 characters each. To avoid this behavior, use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteXmlReader" /> or <see cref="Overload:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> to read FOR XML queries. For more information, see article Q310378, "PRB: XML Data Is Truncated When You Use SqlDataReader," in the Microsoft Knowledge Base at http://support.microsoft.com.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Sends the <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> to the <see cref="P:System.Data.SqlClient.SqlCommand.Connection" /> and builds a <see cref="T:System.Data.SqlClient.SqlDataReader" />.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>A <see cref="T:System.Data.SqlClient.SqlDataReader" /> object.</para>
- </returns>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- </Member>
- <Member MemberName="ExecuteReader">
- <MemberSignature Language="C#" Value="public System.Data.SqlClient.SqlDataReader ExecuteReader (System.Data.CommandBehavior behavior);" />
- <MemberType>Method</MemberType>
- <ReturnValue>
- <ReturnType>System.Data.SqlClient.SqlDataReader</ReturnType>
- </ReturnValue>
- <Parameters>
- <Parameter Name="behavior" Type="System.Data.CommandBehavior" />
- </Parameters>
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>When the <see cref="P:System.Data.SqlClient.SqlCommand.CommandType" /> property is set to StoredProcedure, the <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> property should be set to the name of the stored procedure. The command executes this stored procedure when you call <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" />.</para>
- <block subset="none" type="note">
- <para>Use <see cref="F:System.Data.CommandBehavior.SequentialAccess" /> to retrieve large values and binary data. Otherwise, an <see cref="T:System.OutOfMemoryException" /> might occur and the connection will be closed.</para>
- </block>
- <para>The multiple active result set (MARS) feature allows for multiple actions using the same connection.</para>
- <para>If you use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" /> or <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> to access XML data, SQL Server will return any XML results greater than 2,033 characters in length in multiple rows of 2,033 characters each. To avoid this behavior, use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteXmlReader" /> or <see cref="Overload:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> to read FOR XML queries. For more information, see article Q310378, "PRB: XML Data Is Truncated When You Use SqlDataReader," in the Microsoft Knowledge Base at http://support.microsoft.com.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Sends the <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> to the <see cref="P:System.Data.SqlClient.SqlCommand.Connection" />, and builds a <see cref="T:System.Data.SqlClient.SqlDataReader" /> using one of the <see cref="T:System.Data.CommandBehavior" /> values.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>A <see cref="T:System.Data.SqlClient.SqlDataReader" /> object.</para>
- </returns>
- <param name="behavior">
- <attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Data.CommandBehavior" /> values.</param>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- </Member>
- <Member MemberName="ExecuteScalar">
- <MemberSignature Language="C#" Value="public override object ExecuteScalar ();" />
- <MemberType>Method</MemberType>
- <ReturnValue>
- <ReturnType>System.Object</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Use the <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteScalar" /> method to retrieve a single value (for example, an aggregate value) from a database. This requires less code than using the <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" /> method, and then performing the operations that you need to generate the single value using the data returned by a <see cref="T:System.Data.SqlClient.SqlDataReader" />.</para>
- <para>A typical <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteScalar" /> query can be formatted as in the following C# example: </para>
- <code> cmd.CommandText = "SELECT COUNT(*) FROM dbo.region";
- Int32 count = (Int32) cmd.ExecuteScalar();</code>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The first column of the first row in the result set, or a null reference (Nothing in Visual Basic) if the result set is empty. Returns a maximum of 2033 characters.</para>
- </returns>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- </Member>
- <Member MemberName="ExecuteXmlReader">
- <MemberSignature Language="C#" Value="public System.Xml.XmlReader ExecuteXmlReader ();" />
- <MemberType>Method</MemberType>
- <ReturnValue>
- <ReturnType>System.Xml.XmlReader</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> property ordinarily specifies a tsql statement with a valid FOR XML clause. However, <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> can also specify a statement that returns ntext or nvarchar data that contains valid XML, or the contents of a column defined with the xml data type. </para>
- <para>A typical <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteXmlReader" /> query can be formatted as in the following Microsoft Visual C# example: </para>
- <code>SqlCommand command = new SqlCommand("SELECT * FROM dbo.Customers FOR XML AUTO, XMLDATA", SqlConn);</code>
- <para>This method can also be used to retrieve a single-row, single-column result set that contains XML data. In this case, if more than one row is returned, the <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteXmlReader" /> method attaches the <see cref="T:System.Xml.XmlReader" /> to the value on the first row, and discards the rest of the result set.</para>
- <para>The multiple active result set (MARS) feature allows for multiple actions using the same connection.</para>
- <para>If you use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteReader" /> or <see cref="M:System.Data.SqlClient.SqlCommand.BeginExecuteReader" /> to access XML data, SQL Server will return any XML results greater than 2,033 characters in length in multiple rows of 2,033 characters each. To avoid this behavior, use <see cref="M:System.Data.SqlClient.SqlCommand.ExecuteXmlReader" /> or <see cref="Overload:System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader" /> to read FOR XML queries. For more information, see article Q310378, "PRB: XML Data Is Truncated When You Use SqlDataReader," in the Microsoft Knowledge Base at http://support.microsoft.com.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Sends the <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> to the <see cref="P:System.Data.SqlClient.SqlCommand.Connection" /> and builds an <see cref="T:System.Xml.XmlReader" /> object.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>An <see cref="T:System.Xml.XmlReader" /> object.</para>
- </returns>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- </Member>
- <Member MemberName="Notification">
- <MemberSignature Language="C#" Value="public System.Data.Sql.SqlNotificationRequest Notification { set; get; }" />
- <MemberType>Property</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <Attributes>
- <Attribute>
- <AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
- </Attribute>
- <Attribute>
- <AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
- </Attribute>
- </Attributes>
- <ReturnValue>
- <ReturnType>System.Data.Sql.SqlNotificationRequest</ReturnType>
- </ReturnValue>
- <Docs>
- <value>To be added.</value>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>You must set the value for this property before the command is executed for it to take effect.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Gets or sets a value that specifies the <see cref="T:System.Data.Sql.SqlNotificationRequest" /> object bound to this command.</para>
- </summary>
- </Docs>
- </Member>
- <Member MemberName="NotificationAutoEnlist">
- <MemberSignature Language="C#" Value="public bool NotificationAutoEnlist { set; get; }" />
- <MemberType>Property</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <Attributes>
- <Attribute>
- <AttributeName>System.ComponentModel.DefaultValue(true)</AttributeName>
- </Attribute>
- </Attributes>
- <ReturnValue>
- <ReturnType>System.Boolean</ReturnType>
- </ReturnValue>
- <Docs>
- <value>To be added.</value>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>This feature is used in ASP.NET applications to receive notifications for all commands executed in an ASP page against SQL Server. This enables ASP.NET to cache the page until the queries used to render the page would produce a different result. Automatic enlistment.</para>
- <para>This property applies only to versions of SQL Server that support query notifications. For earlier versions, setting this property to true has no effect on the application.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Gets or sets a value indicating whether the application should automatically receive query notifications from a common <see cref="T:System.Data.SqlClient.SqlDependency" /> object.</para>
- </summary>
- </Docs>
- </Member>
- <Member MemberName="Parameters">
- <MemberSignature Language="C#" Value="public System.Data.SqlClient.SqlParameterCollection Parameters { get; }" />
- <MemberType>Property</MemberType>
- <ReturnValue>
- <ReturnType>System.Data.SqlClient.SqlParameterCollection</ReturnType>
- </ReturnValue>
- <Docs>
- <value>To be added: an object of type 'SqlParameterCollection'</value>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The Microsoft .NET Framework Data Provider for SQL Server does not support the question mark (?) placeholder for passing parameters to a SQL Statement or a stored procedure called by a command of CommandType.Text. In this case, named parameters must be used. For example: </para>
- <para>SELECT * FROM Customers WHERE CustomerID = @CustomerID </para>
- <block subset="none" type="note">
- <para>If the parameters in the collection do not match the requirements of the query to be executed, an error may result.</para>
- </block>
- <para>For more information, see <format type="text/html"><a href="537d8a2c-d40b-4000-83eb-bc1fcc93f707">Using Stored Procedures with a Command</a></format>.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Gets the <see cref="T:System.Data.SqlClient.SqlParameterCollection" />.</para>
- </summary>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <Attributes>
- <Attribute>
- <AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)</AttributeName>
- </Attribute>
- </Attributes>
- </Member>
- <Member MemberName="Prepare">
- <MemberSignature Language="C#" Value="public override void Prepare ();" />
- <MemberType>Method</MemberType>
- <ReturnValue>
- <ReturnType>System.Void</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>If <see cref="P:System.Data.SqlClient.SqlCommand.CommandType" /> is set to StoredProcedure, the call to <see cref="M:System.Data.SqlClient.SqlCommand.Prepare" /> should succeed, although it may cause a no-op.</para>
- <para>Before you call <see cref="M:System.Data.SqlClient.SqlCommand.Prepare" />, specify the data type of each parameter in the statement to be prepared. For each parameter that has a variable length data type, you must set the <see cref="P:System.Data.SqlClient.SqlParameter.Size" /> property to the maximum size needed. <see cref="M:System.Data.SqlClient.SqlCommand.Prepare" /> returns an error if these conditions are not met.</para>
- <block subset="none" type="note">
- <para>If the database context is changed by executing the Transact-SQL USE <database> statement, or by calling the <see cref="M:System.Data.SqlClient.SqlConnection.ChangeDatabase(System.String)" /> method, then <see cref="M:System.Data.SqlClient.SqlCommand.Prepare" /> must be called a second time.</para>
- </block>
- <para>If you call an Execute method after calling <see cref="M:System.Data.SqlClient.SqlCommand.Prepare" />, any parameter value that is larger than the value specified by the <see cref="P:System.Data.SqlClient.SqlParameter.Size" /> property is automatically truncated to the original specified size of the parameter, and no truncation errors are returned.</para>
- <para>Output parameters (whether prepared or not) must have a user-specified data type. If you specify a variable length data type, you must also specify the maximum <see cref="P:System.Data.SqlClient.SqlParameter.Size" />.</para>
- <para>Prior to Visual Studio 2010, <see cref="M:System.Data.SqlClient.SqlCommand.Prepare" /> threw an exception. Beginning in Visual Studio 2010, this method does not throw an exception.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Creates a prepared version of the command on an instance of SQL Server.</para>
- </summary>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- </Member>
- <Member MemberName="ResetCommandTimeout">
- <MemberSignature Language="C#" Value="public void ResetCommandTimeout ();" />
- <MemberType>Method</MemberType>
- <ReturnValue>
- <ReturnType>System.Void</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The default value of the <see cref="P:System.Data.SqlClient.SqlCommand.CommandTimeout" /> is 30 seconds.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Resets the <see cref="P:System.Data.SqlClient.SqlCommand.CommandTimeout" /> property to its default value.</para>
- </summary>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- </Member>
- <Member MemberName="StatementCompleted">
- <MemberSignature Language="C#" Value="public event System.Data.StatementCompletedEventHandler StatementCompleted;" />
- <MemberType>Event</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Data.StatementCompletedEventHandler</ReturnType>
- </ReturnValue>
- <Docs>
- <remarks>To be added.</remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Occurs when the execution of a Transact-SQL statement completes.</para>
- </summary>
- </Docs>
- </Member>
- <Member MemberName="System.Data.IDbCommand.Connection">
- <MemberSignature Language="C#" Value="System.Data.IDbConnection System.Data.IDbCommand.Connection { set; get; }" />
- <MemberType>Property</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Data.IDbConnection</ReturnType>
- </ReturnValue>
- <Docs>
- <value>To be added.</value>
- <remarks>To be added.</remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Gets or sets the <see cref="T:System.Data.SqlClient.SqlConnection" /> used by this instance of the <see cref="T:System.Data.SqlClient.SqlCommand" />.</para>
- </summary>
- </Docs>
- </Member>
- <Member MemberName="System.Data.IDbCommand.CreateParameter">
- <MemberSignature Language="C#" Value="System.Data.IDbDataParameter IDbCommand.CreateParameter ();" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Data.IDbDataParameter</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>To be added.</remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Creates a new instance of a <see cref="T:System.Data.SqlClient.SqlParameter" /> object.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>A <see cref="T:System.Data.SqlClient.SqlParameter" /> object.</para>
- </returns>
- </Docs>
- </Member>
- <Member MemberName="System.Data.IDbCommand.ExecuteReader">
- <MemberSignature Language="C#" Value="System.Data.IDataReader IDbCommand.ExecuteReader ();" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Data.IDataReader</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>To be added.</remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Sends the <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> to the <see cref="P:System.Data.SqlClient.SqlCommand.Connection" />, and builds a <see cref="T:System.Data.SqlClient.SqlDataReader" />.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>A <see cref="T:System.Data.SqlClient.SqlDataReader" /> object.</para>
- </returns>
- </Docs>
- </Member>
- <Member MemberName="System.Data.IDbCommand.ExecuteReader">
- <MemberSignature Language="C#" Value="System.Data.IDataReader IDbCommand.ExecuteReader (System.Data.CommandBehavior behavior);" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Data.IDataReader</ReturnType>
- </ReturnValue>
- <Parameters>
- <Parameter Name="behavior" Type="System.Data.CommandBehavior" />
- </Parameters>
- <Docs>
- <remarks>To be added.</remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Sends the <see cref="P:System.Data.SqlClient.SqlCommand.CommandText" /> to the <see cref="P:System.Data.SqlClient.SqlCommand.Connection" />, and builds a <see cref="T:System.Data.SqlClient.SqlDataReader" /> using one of the <see cref="T:System.Data.CommandBehavior" /> values.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>A <see cref="T:System.Data.SqlClient.SqlDataReader" /> object.</para>
- </returns>
- <param name="behavior">
- <attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Data.CommandBehavior" /> values. </param>
- </Docs>
- </Member>
- <Member MemberName="System.Data.IDbCommand.Parameters">
- <MemberSignature Language="C#" Value="System.Data.IDataParameterCollection System.Data.IDbCommand.Parameters { get; }" />
- <MemberType>Property</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Data.IDataParameterCollection</ReturnType>
- </ReturnValue>
- <Docs>
- <value>To be added.</value>
- <remarks>To be added.</remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Gets the parameter collection.</para>
- </summary>
- </Docs>
- </Member>
- <Member MemberName="System.Data.IDbCommand.Transaction">
- <MemberSignature Language="C#" Value="System.Data.IDbTransaction System.Data.IDbCommand.Transaction { set; get; }" />
- <MemberType>Property</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Data.IDbTransaction</ReturnType>
- </ReturnValue>
- <Docs>
- <summary>To be added.</summary>
- <value>To be added.</value>
- <remarks>To be added.</remarks>
- </Docs>
- </Member>
- <Member MemberName="System.ICloneable.Clone">
- <MemberSignature Language="C#" Value="object ICloneable.Clone ();" />
- <MemberType>Method</MemberType>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <ReturnValue>
- <ReturnType>System.Object</ReturnType>
- </ReturnValue>
- <Parameters />
- <Docs>
- <remarks>To be added.</remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Creates a new <see cref="T:System.Data.SqlClient.SqlCommand" /> object that is a copy of the current instance.</para>
- </summary>
- <returns>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>A new <see cref="T:System.Data.SqlClient.SqlCommand" /> object that is a copy of this instance.</para>
- </returns>
- </Docs>
- </Member>
- <Member MemberName="Transaction">
- <MemberSignature Language="C#" Value="public System.Data.SqlClient.SqlTransaction Transaction { set; get; }" />
- <MemberType>Property</MemberType>
- <ReturnValue>
- <ReturnType>System.Data.SqlClient.SqlTransaction</ReturnType>
- </ReturnValue>
- <Parameters>
- </Parameters>
- <Docs>
- <value>To be added: an object of type 'SqlTransaction'</value>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>You cannot set the <see cref="P:System.Data.SqlClient.SqlCommand.Transaction" /> property if it is already set to a specific value, and the command is in the process of executing. If you set the transaction property to a <see cref="T:System.Data.SqlClient.SqlTransaction" /> object that is not connected to the same <see cref="T:System.Data.SqlClient.SqlConnection" /> as the <see cref="T:System.Data.SqlClient.SqlCommand" /> object, an exception is thrown the next time that you attempt to execute a statement.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Gets or sets the <see cref="T:System.Data.SqlClient.SqlTransaction" /> within which the <see cref="T:System.Data.SqlClient.SqlCommand" /> executes.</para>
- </summary>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <Attributes>
- <Attribute>
- <AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
- </Attribute>
- <Attribute>
- <AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
- </Attribute>
- </Attributes>
- </Member>
- <Member MemberName="UpdatedRowSource">
- <MemberSignature Language="C#" Value="public override System.Data.UpdateRowSource UpdatedRowSource { set; get; }" />
- <MemberType>Property</MemberType>
- <ReturnValue>
- <ReturnType>System.Data.UpdateRowSource</ReturnType>
- </ReturnValue>
- <Parameters>
- </Parameters>
- <Docs>
- <value>To be added: an object of type 'Data.UpdateRowSource'</value>
- <remarks>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>The default <see cref="T:System.Data.UpdateRowSource" /> value is Both unless the command is automatically generated (as in the case of the <see cref="T:System.Data.SqlClient.SqlCommandBuilder" />), in which case the default is None.</para>
- <para>For more information about using the UpdatedRowSource property, see <format type="text/html"><a href="f21e6aba-b76d-46ad-a83e-2ad8e0af1e12">Using Parameters with a DataAdapter</a></format>.</para>
- </remarks>
- <summary>
- <attribution license="cc4" from="Microsoft" modified="false" />
- <para>Gets or sets how command results are applied to the <see cref="T:System.Data.DataRow" /> when used by the Update method of the <see cref="T:System.Data.Common.DbDataAdapter" />.</para>
- </summary>
- </Docs>
- <AssemblyInfo>
- <AssemblyVersion>1.0.5000.0</AssemblyVersion>
- <AssemblyVersion>2.0.0.0</AssemblyVersion>
- </AssemblyInfo>
- <Attributes>
- <Attribute>
- <AttributeName>System.ComponentModel.DefaultValue(System.Data.UpdateRowSource.Both)</AttributeName>
- </Attribute>
- </Attributes>
- </Member>
- </Members>
- </Type>
|