Microsoft.Data.SqlClient This class defines the data structure for ActivityId used for correlated tracing between client (bid trace event) and server (XEvent). It also includes all the APIs used to access the ActivityId. Note: ActivityId is thread based which is stored in TLS. Get the current ActivityId Increment the sequence number and generate the new ActivityId ActivityId The class ADP defines the exceptions that are specific to the Adapters. The class contains functions that take the proper informational variables and then construct the appropriate exception with an error string obtained from the resource framework. The exception is then returned to the caller, so that the caller may then throw from its location so that the catcher of the exception will have the appropriate call stack. This class is used so that there will be compile time checking of error messages. The resource Framework.txt will ensure proper string text based on the appropriate locale. The class ADP defines the exceptions that are specific to the Adapters. The class contains functions that take the proper informational variables and then construct the appropriate exception with an error string obtained from the resource framework. The exception is then returned to the caller, so that the caller may then throw from its location so that the catcher of the exception will have the appropriate call stack. This class is used so that there will be compile time checking of error messages. The resource Framework.txt will ensure proper string text based on the appropriate locale. Infinite connection timeout identifier in seconds Max duration for buffer in seconds Calls "InvalidUdtException.Create" method when an invalid UDT occurs. This allows the caller to determine if it is an error or not for the quotedString to not be quoted The return value is true if the string was quoted and false if it was not Note: In Longhorn you'll be able to rename a machine without rebooting. Therefore, don't cache this machine name. This method attempts to convert the given value to a PoolBlockingPeriod enum. The algorithm is: * if the value is from type string, it will be matched against PoolBlockingPeriod enum names only, using ordinal, case-insensitive comparer * if the value is from type PoolBlockingPeriod, it will be used as is * if the value is from integral type (SByte, Int16, Int32, Int64, Byte, UInt16, UInt32, or UInt64), it will be converted to enum * if the value is another enum or any other type, it will be blocked with an appropriate ArgumentException in any case above, if the converted value is out of valid range, the method raises ArgumentOutOfRangeException. PoolBlockingPeriod value in the valid range This method attempts to convert the given value tp ApplicationIntent enum. The algorithm is: * if the value is from type string, it will be matched against ApplicationIntent enum names only, using ordinal, case-insensitive comparer * if the value is from type ApplicationIntent, it will be used as is * if the value is from integral type (SByte, Int16, Int32, Int64, Byte, UInt16, UInt32, or UInt64), it will be converted to enum * if the value is another enum or any other type, it will be blocked with an appropriate ArgumentException in any case above, if the converted value is out of valid range, the method raises ArgumentOutOfRangeException. application intent value in the valid range Convert a string value to the corresponding SqlConnectionColumnEncryptionSetting. Is it a valid connection level column encryption setting ? Convert connection level column encryption setting value to string. Convert the provided value to a SqlConnectionColumnEncryptionSetting. Convert a string value to the corresponding SqlConnectionAttestationProtocol IP Address Preference. Convert a string value to the corresponding IPAddressPreference. The string representation of the enumeration name to convert. When this method returns, `result` contains an object of type `SqlConnectionIPAddressPreference` whose value is represented by `value` if the operation succeeds. If the parse operation fails, `result` contains the default value of the `SqlConnectionIPAddressPreference` type. `true` if the value parameter was converted successfully; otherwise, `false`. Verifies if the `value` is defined in the expected Enum. Provides a mechanism for enumerating all available instances of SQL Server within the local network Provides a mechanism for enumerating all available instances of SQL Server within the local network. DataTable with ServerName,InstanceName,IsClustered and Version Utilities for manipulating smi-related metadata. Since this class is built on top of SMI, SMI should not have a dependency on this class These are all based off of knowing the clr type of the value as an ExtendedClrTypeCode enum for rapid access. Standard type inference map to get SqlDbType when all you know is the value's type (typecode) This map's index is off by one (add one to typecode locate correct entry) in order to support ExtendedSqlDbType.Invalid This array is meant to be accessed from InferSqlDbTypeFromTypeCode. Dictionary to map from clr type object to ExtendedClrTypeCodeMap enum. This dictionary should only be accessed from DetermineExtendedTypeCode and class ctor for setup. Convert SqlMetaData instance to an SmiExtendedMetaData instance. SqlEventSink is implemented by calling code. In all methods that accept a SqlEventSink directly the sink must be able to handle multiple callbacks without control returning from the original call. Methods that do not accept SmiEventSync are (generally) ProcessEvent on the SmiEventStream methods returning a SmiEventStream and methods that are certain to never call to the server (most will, for in-proc back end). Methods are commented with their corresponding TDS token NOTE: Throwing from these methods will not usually produce the desired effect -- the managed to native boundary will eat any exceptions, and will cause a simple "Something bad happened" exception to be thrown in the native to managed boundary... Formal encoding of SMI's metadata-to-ITypedSetter/-from-ITypedGetter validity rules Represents a single row of data and its metadata. to send result sets to the client from managed code stored-procedures. When writing common language runtime (CLR) applications, you should re-use existing `SqlDataRecord` objects instead of creating new ones every time. Creating many new `SqlDataRecord` objects could severely deplete memory and adversely affect performance. ## Examples The following example shows how to create several objects, which describe the column metadata of a record, and creating a . The column values of the are set and the is sent to the calling program by using the class. [!code-csharp[SqlDataRecord Samples#1](~/../sqlclient/doc/samples/SqlDataRecord.cs#1)] ]]> Represents a single row of data and its metadata. to send result sets to the client from managed code stored-procedures. When writing common language runtime (CLR) applications, you should re-use existing `SqlDataRecord` objects instead of creating new ones every time. Creating many new `SqlDataRecord` objects could severely deplete memory and adversely affect performance. ## Examples The following example shows how to create several objects, which describe the column metadata of a record, and creating a . The column values of the are set and the is sent to the calling program by using the class. [!code-csharp[SqlDataRecord Samples#1](~/../sqlclient/doc/samples/SqlDataRecord.cs#1)] ]]> Gets the number of columns in the data row. This property is read-only.The number of columns in the data row as an integer.To be added. The zero-based ordinal of the column.Returns the name of the column specified by the ordinal argument.A containing the column name.To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Returns the name of the data type for the column specified by the ordinal argument.A that contains the data type of the column. The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Returns a object representing the common language runtime (CLR) type that maps to the SQL Server type of the column specified by the argument.The column type as a object.To be added.The is less than 0 or greater than the number of columns (that is, ).The column is of a user-defined type that is not available to the calling application domain.The column is of a user-defined type that is not available to the calling application domain.There is a type mismatch. The zero-based ordinal of the column.Returns the common language runtime (CLR) type value for the column specified by the ordinal argument.The CLR type value of the column specified by the ordinal. is returned. ]]> The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The array into which to copy the values column values.Returns the values for all the columns in the record, expressed as common language runtime (CLR) types, in an array.An that indicates the number of columns copied. is returned. The length of the `values` array does not need to match the number of columns in the record. If the array length is greater than the number of columns, all of the column values are copied into the array; if it is less, only the array length number of column values is copied into the array, starting at the column value with ordinal 0. ]]> is .There is a type mismatch. The name of the column to look up.Returns the column ordinal specified by the column name.The zero-based ordinal of the column as an integer.To be added. is .The column name could not be found.There is a type mismatch. The zero-based ordinal of the column.Gets the common language runtime (CLR) type value for the column specified by the column argument.The CLR type value of the column specified by the . is returned. ]]> The is less than 0 or greater than the number of columns (that is, ). The name of the column.Gets the common language runtime (CLR) type value for the column specified by the column argument.The CLR type value of the column specified by the . is returned. ]]> The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).The column specified by is null.There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).The column specified by is null.There is a type mismatch. The zero-based ordinal of the column.The offset into the field value to start retrieving bytes.The target buffer to which to copy bytes.The offset into the buffer to which to start copying bytes.The number of bytes to copy to the buffer.Gets the value for the column specified by the ordinal as an array of objects.The number of bytes copied. repeatedly, adjusting the `fieldOffset` parameter accordingly in each call. ]]> The is less than 0 or greater than the number of columns (that is, ).The column specified by is null.There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).The column specified by is null.There is a type mismatch. The zero-based ordinal of the column.The offset into the field value to start retrieving characters.The target buffer to copy chars to.The offset into the buffer to start copying chars to.The number of chars to copy to the buffer.Gets the value for the column specified by the ordinal as an array of objects.The number of characters copied. repeatedly adjusting the `fieldOffset` parameter accordingly in each call. ]]> The is less than 0 or greater than the number of columns (that is, ).The column specified by is null.There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).The column specified by is null.There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).The column specified by is null.There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).The column specified by is null.There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).The column specified by is null.There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).The column specified by is null.There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).The column specified by is null.There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).The column specified by is null.There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).The column specified by is null.There is a type mismatch. The zero-based column ordinal.Returns the specified column's data as a .The value of the specified column as a .To be added. The zero-based column ordinal.Returns the specified column's data as a .The value of the specified column as a .To be added. The zero-based ordinal of the column.Returns true if the column specified by the column ordinal parameter is null. if the column is null; otherwise.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.Returns a object, describing the metadata of the column specified by the column ordinal.The column metadata as a object.To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Returns a object that represents the type (as a SQL Server type, defined in ) that maps to the SQL Server type of the column.The column type as a object.To be added.The is less than 0 or greater than the number of columns (that is, ).The column is of a user-defined type that is not available to the calling application domain.The column is of a user-defined type that is not available to the calling application domain.There is a type mismatch. The zero-based ordinal of the column.Returns the data value stored in the column, expressed as a SQL Server type, specified by the column ordinal.The value of the column, expressed as a SQL Server type, as a . property is true. ]]> The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The array into which to copy the values column values.Returns the values for all the columns in the record, expressed as SQL Server types, in an array.An that indicates the number of columns copied. property is true. The length of the `values` array does not need to match the number of columns in the record. If the array length is greater than the number of columns, all of the column values are copied into the array; if it is less, only the array length number of column values are copied into the array, starting at the column value with ordinal 0. ]]> is .There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The zero-based ordinal of the column.Gets the value for the column specified by the ordinal as a .The column value as a .To be added.The is less than 0 or greater than the number of columns (that is, ).There is a type mismatch. The array of new values, expressed as CLR types boxed as references, for the instance.Sets new values for all of the columns in the . These values are expressed as common language runtime (CLR) types.The number of column values set as an integer. instance. ]]> is .The size of values does not match the number of columns in the instance. The zero-based ordinal of the column.The new value for the specified column.Sets a new value, expressed as a common language runtime (CLR) type, for the column specified by the column ordinal. instance. ]]> The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added. The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The offset into the field value to start copying bytes.The target buffer from which to copy bytes.The offset into the buffer from which to start copying bytes.The number of bytes to copy from the buffer.Sets the data stored in the column to the specified array of values.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The offset into the field value to start copying characters.The target buffer from which to copy chars.The offset into the buffer from which to start copying chars.The number of chars to copy from the buffer.Sets the data stored in the column to the specified array of values.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the value of the column specified to the .To be added.The passed in is a negative number.The value passed in is greater than 24 hours in length. The zero-based ordinal of the column.The new value of the column.Sets the value of the column specified to the value.To be added. The zero-based ordinal of the column.Sets the value in the specified column to .To be added. The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). The zero-based ordinal of the column.The new value of the column.Sets the data stored in the column to the specified value.To be added.The is less than 0 or greater than the number of columns (that is, ). An array of objects that describe each column in the .Inititializes a new instance with the schema based on the array of objects passed as an argument. object from two objects, which indicate the column name and data type. [!code-csharp[SqlDataRecord Samples#2](~/../sqlclient/doc/samples/SqlDataRecord.cs#2)] ]]> The is . The zero-based ordinal of the column.Not supported in this release. Always throws an exception. if called. ]]> The is less than 0 or greater than the number of columns (that is, ). Specifies and retrieves metadata information from parameters and columns of objects. This class cannot be inherited. objects, which describe the column metadata of a record, and the creation of a . The column values of the are set and the is sent to the calling program using the class. [!code-csharp[SqlMetaData Samples#1](~/../sqlclient/doc/samples/SqlMetaData.cs#1)] ]]> The name of the column.The SQL Server type of the parameter or column.Initializes a new instance of the class with the specified column name and type. , , , and properties are set to `null`): |SqlDbType|Maximum length|Precision|Scale|Locale|Compare options| |---------------|--------------------|---------------|-----------|------------|---------------------| |`Bit`|1|1|0|0|None| |`BigInt`|8|19|0|0|None| |`DateTime`|8|23|3|0|None| |`Decimal`|9|18|0|0|None| |`Float`|8|53|0|0|None| |`Int`|4|10|0|0|None| |`Money`|8|19|4|0|None| |`Numeric`|9|18|0|0|None| |`SmallDateTime`|4|16|0|0|None| |`SmallInt`|2|5|0|0|None| |`SmallMoney`|4|10|4|0|None| |`TimeStamp`|8|0|0|0|None| |`TinyInt`|1|3|0|0|None| |`UniqueIdentifier`|16|0|0|0|None| |`Xml`|Max (-1)|0|0|0|IgnoreCase, IgnoreKanaType, IgnoreWidth| ## Examples The following example creates a new object by specifying the column name and a column data type of .`Int`. [!code-csharp[SqlMetaData Samples#3](~/../sqlclient/doc/samples/SqlMetaData.cs#3)] ]]> The is .A that is not allowed was passed to the constructor as . The name of the column.The SQL Server type of the parameter or column.Specifies whether this column should use the default server value.Specifies if the column in the table-valued parameter is unique.Specifies the sort order for a column.Specifies the ordinal of the sort column.Initializes a new instance of the class with the specified column name, and default server. This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column. The name of the column.The SQL Server type of the parameter or column.The maximum length of the specified type.Initializes a new instance of the class with the specified column name, type, and maximum length. , or -1 is allowed for a `dbType` of `Text`, `NText`, or `Image`. For a `dbType` of `Varchar`, `Nvarchar`, or `VarBinary`, a length specification of , or -1, declares the metadata as varchar(max), nvarchar(max), or nvarbinary(max), respectively. The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the , , , and properties are set to `null`): |SqlDbType|Precision|Scale|Locale|Compare options| |---------------|---------------|-----------|------------|---------------------| |Binary|0|0|0|IgnoreCase, IgnoreKanaType, IgnoreWidth| |Char|0|0|\|IgnoreCase, IgnoreKanaType, IgnoreWidth| |Image|0|0|0|None| |NChar|0|0|\|IgnoreCase, IgnoreKanaType, IgnoreWidth| |NText|0|0|\|IgnoreCase, IgnoreKanaType, IgnoreWidth| |NVarChar|0|0|\|IgnoreCase, IgnoreKanaType, IgnoreWidth| |Text|0|0|\|IgnoreCase, IgnoreKanaType, IgnoreWidth| |VarBinary|0|0||IgnoreCase, IgnoreKanaType, IgnoreWidth| |VarChar|0|0|\|IgnoreCase, IgnoreKanaType, IgnoreWidth| ## Examples The following example creates a new object by specifying the column name, a column data type of `.NVarChar`, and a maximum length of 12 characters. [!code-csharp[SqlMetaData Samples#2](~/../sqlclient/doc/samples/SqlMetaData.cs#2)] ]]> The is .A SqlDbType that is not allowed was passed to the constructor as . The name of the column.The SQL Server type of the parameter or column.The maximum length of the specified type.Specifies whether this column should use the default server value.Specifies if the column in the table-valued parameter is unique.Specifies the sort order for a column.Specifies the ordinal of the sort column.Initializes a new instance of the class with the specified column name, type, maximum length, and server default. This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column. The name of the column.The SQL Server type of the parameter or column.A instance that points to the UDT.Initializes a new instance of the class with the specified column name, type, and user-defined type (UDT). , , , and properties are set to `null`): |SqlDbType|Maximum length|Precision|Scale|Locale|Compare options| |---------------|--------------------|---------------|-----------|------------|---------------------| |UDT|\ or -1|0|0|0|None| ]]> The is .A SqlDbType that is not allowed was passed to the constructor as , or points to a type that does not have declared. The name of the column.The SQL Server type of the parameter or column.A instance that points to the UDT.The SQL Server type name for .Initializes a new instance of the class with the specified column name, user-defined type (UDT), and SQLServer type. The name of the column.The SQL Server type of the parameter or column.A instance that points to the UDT.The SQL Server type name for .Specifies whether this column should use the default server value.Specifies if the column in the table-valued parameter is unique.Specifies the sort order for a column.Specifies the ordinal of the sort column.Initializes a new instance of the class with the specified column name, type, user-defined type, SQL Server type, and server default. This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column. The name of the parameter or column.The SQL Server type of the parameter or column.The precision of the parameter or column.The scale of the parameter or column.Initializes a new instance of the class with the specified column name, type, precision, and scale. , , , and properties are set to `null`): |SqlDbType|Maximum length|Precision|Scale|Locale|Compare options| |---------------|--------------------|---------------|-----------|------------|---------------------| |Decimal|9|18|0|0|None| ]]> The is .A that is not allowed was passed to the constructor as , or was greater than . The name of the column.The SQL Server type of the parameter or column.The precision of the parameter or column.The scale of the parameter or column.Specifies whether this column should use the default server value.Specifies if the column in the table-valued parameter is unique.Specifies the sort order for a column.Specifies the ordinal of the sort column.Initializes a new instance of the class with the specified column name, type, precision, scale, and server default. This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column. The name of the parameter or column.The SQL Server type of the parameter or column.The maximum length of the specified type.The locale ID of the parameter or column.The comparison rules of the parameter or column.Initializes a new instance of the class with the specified column name, type, maximum length, locale, and compare options. , or -1, is allowed for a `dbType` of `Text` or `NText`. For a `dbType` of `Varchar` or `Nvarchar`, a length specification of , or -1, declares the metadata as varchar(max) and nvarchar(max), respectively. The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the , , , and properties are set to `null`): |SqlDbType|Precision|Scale| |---------------|---------------|-----------| |`Char`|0|0| |`NChar`|0|0| |`NText`|0|0| |`NVarChar`|0|0| |`Text`|0|0| |`VarChar`|0|0| ]]> The is .A SqlDbType that is not allowed was passed to the constructor as . The name of the column.The SQL Server type of the parameter or column.The maximum length of the specified type.The locale ID of the parameter or column.The comparison rules of the parameter or column.Specifies whether this column should use the default server value.Specifies if the column in the table-valued parameter is unique.Specifies the sort order for a column.Specifies the ordinal of the sort column.Initializes a new instance of the class with the specified column name, type, maximum length, locale, compare options, and server default. This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column. The name of the column.The SQL Server type of the parameter or column.The database name of the XML schema collection of a typed XML instance.The relational schema name of the XML schema collection of a typed XML instance.The name of the XML schema collection of a typed XML instance.Specifies whether this column should use the default server value.Specifies if the column in the table-valued parameter is unique.Specifies the sort order for a column.Specifies the ordinal of the sort column.Initializes a new instance of the class with the specified column name, database name, owning schema, object name, and default server. This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column. The name of the column.The SQL Server type of the parameter or column.The maximum length of the specified type.The precision of the parameter or column.The scale of the parameter or column.The locale ID of the parameter or column.The comparison rules of the parameter or column.A instance that points to the UDT.Initializes a new instance of the class with the specified column name, type, maximum length, precision, scale, locale ID, compare options, and user-defined type (UDT). , , , and properties are set to `null`): |SqlDbType|Maximum length|Precision|Scale|Locale|Compare options| |---------------|--------------------|---------------|-----------|------------|---------------------| |`BigInt`|8|19|0|0|None| |`Bit`|1|1|0|0|None| |`DateTime`|8|23|3|0|None| |`Decimal`|9|18|0|0|None| |`Float`|8|53|0|0|None| |`Image`|Max (-1)|0|0|0|None| |`Int`|4|10|0|0|None| |`Money`|8|19|4|0|None| |`Ntext`|Max (-1)|0|0|\|IgnoreCase, IgnoreKanaType, IgnoreWidth| |`Real`|4|24|0|0|None| |`Row`|\|0|0|0|None| |`SmallDateTime`|4|16|0|0|None| |`SmallInt`|2|5|0|0|None| |`SmallMoney`|4|10|4|0|None| |`Text`|Max (-1)|0|0|\|IgnoreCase, IgnoreKanaType, IgnoreWidth| |`TimeStamp`|8|0|0|0|None| |`TinyInt`|1|3|0|0|None| |`UniqueIdentifier`|16|0|0|0|None| |`UDT`|\ or -1|0|0|0|None| |`Variant`|8016|0|0|0|None| |`Xml`|Max (-1)|0|0|0|IgnoreCase, IgnoreKanaType, IgnoreWidth| ]]> The is .A that is not allowed was passed to the constructor as , or points to a type that does not have declared. The name of the column.The SQL Server type of the parameter or column.The maximum length of the specified type.The precision of the parameter or column.The scale of the parameter or column.The locale ID of the parameter or column.The comparison rules of the parameter or column.A instance that points to the UDT.Specifies whether this column should use the default server value.Specifies if the column in the table-valued parameter is unique.Specifies the sort order for a column.Specifies the ordinal of the sort column.Initializes a new instance of the class with the specified column name, type, maximum length, precision, scale, locale ID, compare options, and user-defined type (UDT). This form of the constructor supports table-valued parameters by allowing you to specify if the column is unique in the table-valued parameter, the sort order for the column, and the ordinal of the sort column. The name of the column.The SQL Server type of the parameter or column.The database name of the XML schema collection of a typed XML instance.The relational schema name of the XML schema collection of a typed XML instance.The name of the XML schema collection of a typed XML instance.Initializes a new instance of the class with the specified column name, type, database name, owning schema, and object name. The is , or is when and are non-.A SqlDbType that is not allowed was passed to the constructor as . Gets the comparison rules used for the column or parameter.The comparison rules used for the column or parameter as a .To be added. Gets the data type of the column or parameter.The data type of the column or parameter as a . .`String`. ]]> Indicates if the column in the table-valued parameter is unique.A value. constructors. For more information, see [Table-Valued Parameters](/sql/connect/ado-net/sql/table-valued-parameters). ]]> Gets the locale ID of the column or parameter.The locale ID of the column or parameter as a . Gets the length of , , and data types.The length of , , and data types. Gets the maximum length of the column or parameter.The maximum length of the column or parameter as a . .`Row` this returns the number of columns in the row metadata instance. The default value is 0. ]]> Gets the name of the column or parameter.The name of the column or parameter as a .To be added. Gets the precision of the column or parameter.The precision of the column or parameter as a . Gets the scale of the column or parameter.The scale of the column or parameter. Returns the sort order for a column.A object. constructors. For more information, see [Table-Valued Parameters](/sql/connect/ado-net/sql/table-valued-parameters). ]]> Returns the ordinal of the sort column.The ordinal of the sort column. constructors. For more information, see [Table-Valued Parameters](/sql/connect/ado-net/sql/table-valued-parameters). ]]> Gets the data type of the column or parameter.The data type of the column or parameter as a . Gets the common language runtime (CLR) type of a user-defined type (UDT).The CLR type name of a user-defined type as a . is not a UDT type. `Null` may also returned for valid UDT result sets where the assembly is not available to the application. ]]> Gets the three-part name of the user-defined type (UDT) or the SQL Server type represented by the instance.The name of the UDT or SQL Server type as a . Reports whether this column should use the default server value.A value. constructors. ]]> Gets the name of the database where the schema collection for this XML instance is located.The name of the database where the schema collection for this XML instance is located as a . and are also null. ]]> Gets the name of the schema collection for this XML instance.The name of the schema collection for this XML instance as a . and are also `null`. ]]> Gets the owning relational schema where the schema collection for this XML instance is located.The owning relational schema where the schema collection for this XML instance is located as a . and are also `null`. ]]> The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as an array of values.To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as an array of values.To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The object used from which the metadata is inferred.The name assigned to the returned instance.Infers the metadata from the specified object and returns it as a instance.The inferred metadata as a instance.To be added.The is . The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified array of values against the metadata, and adjusts the value if necessary.The adjusted value as an array of values.To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified value against the metadata, and adjusts the value if necessary.The adjusted value as a .To be added. does not match the type, or could not be adjusted. The value to validate against the instance.Validates the specified array of values against the metadata, and adjusts the value if necessary.The adjusted value as an array values.To be added. does not match the type, or could not be adjusted. This class implements and is used for active directory federated authentication mechanisms. This is a static cache instance meant to hold instances of "PublicClientApplication" mapping to information available in PublicClientAppKey. The purpose of this cache is to allow re-use of Access Tokens fetched for a user interactively or with any other mode to avoid interactive authentication request every-time, within application scope making use of MSAL's userTokenCache. Initializes the class. Client Application Id to be used for acquiring an access token for federated authentication. The driver uses its own application client id by default. Initializes the class with the provided application client id. The callback method to be used with 'Active Directory Device Code Flow' authentication.(Optional) Client Application Id to be used for acquiring an access token for federated authentication. The driver uses its own application client id by default. Initializes the class with the provided device code flow callback method and application client id. Clears cached user tokens from the token provider.This will cause interactive authentication prompts to appear again if tokens were previously being obtained from the cache. The callback method to be used with 'Active Directory Device Code Flow' authentication.Sets the callback method, overriding the default implementation that processes the result for 'Active Directory Device Code Flow' authentication. The callback method to be called by MSAL.NET to delegate the Web user interface with the Secure Token Service (STS).Sets a callback method which is invoked with a custom Web UI instance that will let the user sign-in with Azure Active Directory, present consent if needed, and get back the authorization code. Applicable when working with Active Directory Interactive authentication.The "authorizationUri" is crafted to leverage PKCE in order to protect the token from a man in the middle attack. Only MSAL.NET can redeem the code. In the event of cancellation, the implementer should return . The authentication method.Indicates whether the specified authentication method is supported. if the specified authentication method is supported; otherwise, . are: - Active Directory Password - Active Directory Integrated - Active Directory Interactive - Active Directory Service Principal - Active Directory Device Code Flow - Active Directory Managed Identity - Active Directory MSI - Active Directory Default ]]> The authentication method.This method is called immediately before the provider is added to authentication provider registry. Avoid performing long-waiting tasks in this method, since it can block other threads from accessing the provider registry. The authentication method.This method is called immediately before the provider is removed from the authentication provider registry. For example, this method is called when a different provider with the same authentication method overrides this provider in the authentication provider registry. Avoid performing long-waiting task in this method, since it can block other threads from accessing the provider registry. The parent as an object, in order to be used from shared .NET Standard assemblies.Sets a reference to the ViewController (if using Xamarin.iOS), Activity (if using Xamarin.Android) IWin32Window or IntPtr (if using .NET Framework). Used for invoking the browser for Active Directory Interactive authentication.Mandatory to be set only on Android. See https://aka.ms/msal-net-android-activity for further documentation and details. The Active Directory authentication parameters passed to authentication providers.Acquires a security token from the authority.Represents an asynchronous operation that returns the authentication token. AD auth retry states. AD auth retry helper. Constructor. Retry state. Cached token. Whether login can be retried after a client/server connection timeout due to a long-time token acquisition. Specifies a value for . Possible values are and . To be added. The application workload type when connecting to a server is read write.00 The application workload type when connecting to a server is read only.11 Class encapsulating Column encryption key info Constructor Decrypted key bytes database id for this column encryption key key metadata version for this column encryption key key id for this column encryption key Calculates number of bytes required to serialize this object Number of bytes required for serialization Serialize this object in a given byte[] starting at a given offset byte array for serialization start offset in byte array next available offset Represents the Data Classification Labels as received from SQL Server for the active 'SqlDataReader' Gets the name for this 'Label' objectName of label. Gets the ID for this 'Label' objectID of label. Initializes a new instance of the class.Name of label.ID of label. Represents the Data Classification Information Types as received from SQL Server for the active 'SqlDataReader' Gets the name for this 'InformationType' objectName of Information Type. Gets the ID for this 'InformationType' objectID of Information Type. Initializes a new instance of the class.Name of Information Type.ID of Information Type. A relative ranking of the sensitivity of a query or of a column that is part of percolumn data. It is an identifier based on a predefined set of values which define sensitivity rank. Used by other services like Advanced Threat Protection to detect anomalies based on their rank. Represents the Data Classification Sensitivity Information for columns as configured in Database. Returns the label for this 'SensitivityProperty' ObjectLabel for this SensitivityProperty. Returns the information type for this 'SensitivityProperty' ObjectInformation type for this SensitivityProperty. Returns the sensitivity rank for this 'SensitivityProperty' ObjectSensitivity rank for this SensitivityProperty. Initializes a new instance of the class.Label for this SensitivityProperty.Information type for this SensitivityProperty.Sensitivity rank for this SensitivityProperty. Represents the Data Classification Sensitivity Information for columns as configured in Database. Returns the list of sensitivity properties as received from Server for this 'ColumnSensitivity' informationList of sensitivity properties. Initializes a new instance of the class.List of sensitivity properties. Provides the functionlity to retrieve Sensitivity Classification data as received from SQL Server for the active 'SqlDataReader' Returns the labels collection for this 'SensitivityClassification' ObjectList of labels. Returns the information types collection for this 'SensitivityClassification' ObjectList of information types. Returns the relative sensitivity rank for the query associated with the active 'SqlDataReader'.Relative sensitivity ranking for this query. Returns the column sensitivity for this 'SensitivityClassification' ObjectList of column sensitivities. Initializes a new instance of the class.List of labels.List of information types.List of column sensitivities.Relative sensitivity rank for the query associated with the active 'SqlDataReader'. A delegate for communicating with secure enclave Decrypt the keys that need to be sent to the enclave Keys that need to sent to the enclave Generate a byte package consisting of decrypted keys and some headers expected by the enclave counter to avoid replay attacks Encrypt the byte package containing keys with the session key byte package containing keys session key used to encrypt the package server hosting the enclave Exception when executing a enclave based Always Encrypted query Create a new enclave session attestation protocol enclave type The set of parameters required for enclave session. attestation info from SQL Server attestation parameters A set of extra data needed for attesting the enclave. The length of the extra data needed for attesting the enclave. Indicates if this is a retry from a failed call. Generate the byte package that needs to be sent to the enclave attestation protocol Keys to be sent to enclave enclave type The set of parameters required for enclave session. connection executing the query command executing the query Class encapsulating necessary information about the byte package that needs to be sent to the enclave Constructor byte package to be sent to enclave enclave session to be used When using Encrypt=false in the connection string, a security warning is output to the console if the TLS version is 1.2 or lower. This warning can be suppressed by enabling this AppContext switch. This app context switch defaults to 'false'. In System.Data.SqlClient and Microsoft.Data.SqlClient prior to 3.0.0 a field with type Timestamp/RowVersion would return an empty byte array. This switch contols whether to preserve that behaviour on newer versions of Microsoft.Data.SqlClient, if this switch returns false an appropriate null value will be returned. This app context switch defaults to 'false'. When enabled, ReadAsync runs asynchronously and does not block the calling thread. This app context switch defaults to 'false'. Specifies minimum login timeout to be set to 1 second instead of 0 seconds, to prevent a login attempt from waiting indefinitely. This app context switch defaults to 'true'. The source of the event. A object that contains the event data. Handles the event that is fired when a notification is received for any of the commands associated with a object. event does not necessarily imply a change in the data. Other circumstances, such as time-out expired and failure to set the notification request, also generate . ]]> Specifies a value for the property. To be added. Blocking period OFF for Azure SQL servers, but ON for all other SQL servers.0 Blocking period ON for all SQL servers including Azure SQL servers.1 Blocking period OFF for Azure SQL servers, but ON for all other SQL servers.2 Fetch values from an application configuration file Fetch the specified configuration section from the configuration file The specified `T` object or default value of `T` if the section doesn't exist. The configuration section definition for reading a configuration file. The configuration section definition for reading a configuration file. Represents the set of arguments passed to the event. The current retry attempt count.The delay that indicates how long the current thread will be suspended before the next iteration is invoked.The list of exceptions since the first retry that caused the retry logic to re-execute the function.Initializes a new instance of the class. Retry-attempt-number, after the first exception occurrence. that returns the number of retry execution attempts; starting from 1. Gets the current waiting time as a object. The upcoming gap time before the next execution attempt. Gets or sets a value that indicates whether the retry logic should be canceled. If set to , the execution attempt will be interrupted immediately. Gets the list of exceptions since the first attempt failure.List of occurred exceptions. Generates a sequence of time intervals. The default gap time of each interval. The maximum allowed time interval value. The minimum allowed time interval value. Gets the element in the collection at the current position of the enumerator. Initializes a new instance of the class with a default value of zero for the gap time, minimum, and maximum interval time. The gap time used to calculate the time delay before each attempt.The maximum time allowed as a gap time.The minimum time allowed as a gap time.Initializes a new instance of the class.The supplied arguments failed validation. Sets the enumerator to its initial position, which is before the first element in the collection. The gap time of each interval. Must be between 0 and 120 seconds.Maximum time interval value. Must be between 0 and 120 seconds.Minimum time interval value. Must be less than maximum time interval and between 0 and 120 seconds.Validate the enumeration parameters.The supplied arguments failed validation. Calculates the next interval time.Returns the next gap time interval. Advances the enumerator to the next element of the collection.Returns , if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Creates a new object that is a copy of the current instance.A new object that is a copy of this instance. Retrieves the next time interval with respect to the number of retries if a transient condition occurs. Maximum number of retries. that returns the maximum number of retry execution attempts that will be attempted after the first failure. Current retry number starting from zero. that returns the number of retry execution attempts after the first failure. The timer interval enumerator. value that indicates an enumerator to generate a sequence of time intervals. Delegate to a transient condition predicate. The function that this delegate points to must return a true value when an expected transient exception happens. value that delegates to a function that receives a input parameter. The sender object.Pre-retry validation for the sender state.Returns if the sender is authorized to retry the operation. [IMPORTANT!] > Operations that are part of a **Transaction** are not safe to retry without specific knowledge of business logic. Due to this complexity, retry logic should be managed at the application level. > [!NOTE] > The `RetryCondition` is an extra condition that checks before executing the `TransientPredicate` and the default condition always returns **true**. ]]> The interval time that is generated by the `RetryIntervalEnumerator`.Try to get the next interval time by using the enumerator if the counter does not exceed the number of retries.Returns if the number of retry attempts has not been exceeded; otherwise . Set the counters and enumerator to default values for next use. Creates a new object that is a copy of the current instance.When implemented in a derived class, the method is expected to return a new object of the current instance. The default implementation throws NotImplementedException.In all cases. Applies retry logic on an operation through the `Execute` or `ExecuteAsync` function. Occurs before applying the calculated delay time and executing the function on a next attempt. with event argument of object can be subscribed. [IMPORTANT!] > Don't block execution with a time consuming action when an event occurs. For instance, if you log data to a file, run it in a new thread to avoid blocking the main execution thread. ]]> Defines the retry logic used to decide when to retry based on the encountered exception. [!NOTE] > The `RetryLogic` property is assigned at `SqlRetryLogicBaseProvider` creation and its value is used as a template internally. Don't use it to monitor the status of the retry logic during and after execution. Instead, use the event to collect data about retry executions. ]]> The object that the `function` returns when executed.The source of the event.The operation to re-execute if a transient condition occurs.Executes a function and applies retry logic, if enabled. **Note:** Exceptions will be reported via an aggregate exception if the execution isn't successful via retry attempts. The return value of the `function` if it runs without exception. [!NOTE] > The type of exception depends on the `function`'s internal implementation. But if the exception is due to all retry attempts failing, it will be an that consists of all exceptions that happened during the failed attempts. ]]> The `function` parameter can't be `null`.The collection of exceptions after all retry attempts have failed. The object that the `function` returns in a Task when executed.The source of the event.The operation to re-execute if a transient condition occurs.The cancellation instruction.Executes a function and applies retry logic, if enabled. The cancellation token can be used to request that the operation be abandoned before the execution attempts are exceeded. **Note:** Exceptions will be reported via the returned Task object, which will contain an aggregate exception if execution fails for all retry attempts.A task representing the asynchronous operation. The results of the task will be the return value of the `function`, if it runs without exception. [!NOTE] > If the exception comes from all retry attempts failing, it will be an that consists of all exceptions from the failed attempts. ]]> The `function` parameter can't be `null`.The collection of exceptions after failed retry attempts. The source of the event.The operation to re-execute if a transient condition occurs.The cancellation instruction.Executes a function and applies retry logic, if enabled. The cancellation token can be used to request that the operation be abandoned before the execution attempts are exceeded. **Note:** Exceptions will be reported via the returned Task object, which will contain an aggregate exception if execution fails for all retry attempts.A Task or an exception. [!NOTE] > If the exception comes from all retry attempts failing, it will be an that consists of all exceptions from the failed attempts. ]]> The `function` parameter can't be `null`.The collection of exceptions after failed retry attempts. Applies retry logic on an operation. Creates an instance of this type. Executes a function and applies retry logic, if enabled. Executes a function and applies retry logic, if enabled. Executes a function and applies retry logic if, enabled. Provides the retry logic parameters to create an instance of the class by using methods. Sets the number of times to try and execute the function. between 1 and 60; 1 means to execute one time and if an error is encountered, don't retry. Sets the gap time interval as a object. The upcoming gap time before the next execution attempt; must be between 0 and 120 seconds. Sets the minimum allowed gap time interval as a object. The minimum upcoming gap time before the next execution attempt; the default value is **zero** and must be between 0 and 120 seconds. Sets the allowed maximum gap time interval as a object. The maximum upcoming gap time interval before the next execution attempt; must be between 0 and 120 seconds. Sets the list of transient error numbers on which to retry when they occur.List of ; Set to to use the internal list of exceptions from the object. Sets a pre-retry validation function on the to only include specific SQL statements. The pre-retry validation delegate function; if the `CommandText` is authorized to retry the operation. Provides different retry logic providers with a common list of transient errors. Default known transient error numbers. An object of containing the configuration for the object.Provides an exponential time interval retry logic provider.A object. [!NOTE] > The inner enumerator includes randomization to prevent multiple instances of the client from performing subsequent retry attempts at the same time. ]]> If the `retryLogicOption` parameter was null.If at least one of the following conditions occurs: - `NumberOfTries` is less than 1 or bigger than 60. - `DeltaTime` is bigger than 120 seconds. - `MinTimeInterval` is bigger than 120 seconds. - `MaxTimeInterval` is bigger than 120 seconds. - `MinTimeInterval` is not less than `MaxTimeInterval`. An object of containing the configuration for the object.Provides an incremental time interval retry logic provider.A object. [!NOTE] > The inner enumerator includes randomization to prevent multiple instances of the client from performing subsequent retry attempts at the same time. ]]> If the `retryLogicOption` parameter was null.If at least one of the following conditions occurs: - `NumberOfTries` is less than 1 or bigger than 60. - `DeltaTime` is bigger than 120 seconds. - `MinTimeInterval` is bigger than 120 seconds. - `MaxTimeInterval` is bigger than 120 seconds. - `MinTimeInterval` is not less than `MaxTimeInterval`. An object of containing the configuration for the object.Provides a fixed interval time retry logic provider.A object. [!NOTE] > The inner enumerator includes randomization to prevent multiple instances of the client from performing subsequent retry attempts at the same time. ]]> If the `retryLogicOption` parameter was null.If at least one of the following conditions occurs: - `NumberOfTries` is less than 1 or bigger than 60. - `DeltaTime` is bigger than 120 seconds. - `MinTimeInterval` is bigger than 120 seconds. - `MaxTimeInterval` is bigger than 120 seconds. - `MinTimeInterval` is not less than `MaxTimeInterval`. Provides a non-retriable provider with a that returns .A object. [!NOTE] > The returned provider of this function performs a single execution without any retry logic. ]]> Verifies the provider which is not null and doesn't include SqlNoneIntervalEnumerator enumerator object. Return true if the exception is a transient fault. Configurable retry logic loader This class shouldn't throw exceptions; All exceptions should be handled internally and logged with Event Source. Configurable retry logic manager The default non retry provider will apply if a parameter passes by null. Default Retry provider for SqlConnections Default Retry provider for SqlCommands Used to log attempts Performs a case-sensitive search to resolve the specified type name and its related assemblies in default assembly load context if they aren't loaded yet. Resolved type if it could resolve the type; otherwise, the `SqlConfigurableRetryFactory` type. If the caller does not have sufficient permissions to read the specified file, no exception is thrown and the method returns null regardless of the existence of path. Load assemblies on request. Configurable retry logic manager; Receive the default providers by a loader and feeds connections and commands. Default Retry provider for SqlConnections Default Retry provider for SqlCommands Represents the set of arguments passed to the .To be added. An that indicates the number of rows copied during the current bulk copy operation.Creates a new instance of the object. Gets or sets a value that indicates whether the bulk copy operation should be aborted. if the bulk copy operation should be aborted; otherwise . property to cancel a bulk copy operation. Set to `true` to abort the bulk copy operation. If you call the **Close** method from , an exception is generated, and the object state does not change. If an application specifically creates a object in the constructor, the transaction is not rolled back. The application is responsible for determining whether it is required to rollback the operation, and if so, it must call the method. If the application does not create a transaction, the internal transaction corresponding to the current batch is automatically rolled back. However, changes related to previous batches within the bulk copy operation are retained, because the transactions for them already have been committed. ]]> Gets a value that returns the number of rows copied during the current bulk copy operation. that returns the number of rows copied. property is reset on each call to any of the `SqlBulkCopy.WriteToServer` methods. ]]> The source of the event.A object that contains the event data.Represents the method that handles the event of a .To be added. Forces the TextReader to act as if it was closed This does not actually close the stream, read off the rest of the data or dispose this Performs the actual reading and converting NOTE: This assumes that buffer, index and count are all valid, we're not closed (!IsClosed) and that there is data left (IsDataLeft()) Creates a byte array large enough to store all bytes for the characters in the current encoding, then fills it with any leftover bytes Number of characters that are to be read Number of bytes pre-filled by the leftover bytes A byte array of the correct size, pre-filled with leftover bytes Decodes the given bytes into characters, and stores the leftover bytes for later use Buffer of bytes to decode Number of bytes to decode from the inBuffer Buffer to write the characters to Offset to start writing to outBuffer at Maximum number of characters to decode The actual number of characters decoded True if this TextReader is supposed to be closed True if there is a peeked character available Checks the parameters passed into a Read() method are valid Represents a Transact-SQL transaction to be made in a SQL Server database. This class cannot be inherited. object by calling on the object. All subsequent operations associated with the transaction (for example, committing or aborting the transaction), are performed on the object. > [!NOTE] > `Try`/`Catch` exception handling should always be used when committing or rolling back a . Both and generate an if the connection is terminated or if the transaction has already been rolled back on the server. For more information on SQL Server transactions, see [Explicit Transactions](https://msdn.microsoft.com/library/ms175127\(SQL.105\).aspx) and [Coding Efficient Transactions](https://msdn.microsoft.com/library/ms187484\(SQL.105\).aspx). ## Examples The following example creates a and a . It also demonstrates how to use the , , and methods. The transaction is rolled back on any error, or if it is disposed without first being committed. `Try`/`Catch` error handling is used to handle any errors when attempting to commit or roll back the transaction. [!code-csharp[SqlConnection_BeginTransaction Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction.cs#1)] ]]> Represents a Transact-SQL transaction to be made in a SQL Server database. This class cannot be inherited. object by calling on the object. All subsequent operations associated with the transaction (for example, committing or aborting the transaction), are performed on the object. > [!NOTE] > `Try`/`Catch` exception handling should always be used when committing or rolling back a . Both and generate an if the connection is terminated or if the transaction has already been rolled back on the server. For more information on SQL Server transactions, see [Explicit Transactions](https://msdn.microsoft.com/library/ms175127\(SQL.105\).aspx) and [Coding Efficient Transactions](https://msdn.microsoft.com/library/ms187484\(SQL.105\).aspx). ## Examples The following example creates a and a . It also demonstrates how to use the , , and methods. The transaction is rolled back on any error, or if it is disposed without first being committed. `Try`/`Catch` error handling is used to handle any errors when attempting to commit or roll back the transaction. [!code-csharp[SqlConnection_BeginTransaction Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction.cs#1)] ]]> Gets the object associated with the transaction, or if the transaction is no longer valid.The object associated with the transaction. . ]]> To be added.To be added.To be added. Specifies the for this transaction.The for this transaction. The default is . applies to the whole transaction. For more information on SQL Server isolation levels, see [Transaction Isolation Levels](/sql/t-sql/language-elements/transaction-isolation-levels). ]]> Commits the database transaction. method is equivalent to the Transact-SQL COMMIT TRANSACTION statement. You cannot roll back a transaction once it has been committed, because all modifications have become a permanent part of the database. For more information, see [COMMIT TRANSACTION (Transact-SQL)](/sql/t-sql/language-elements/commit-transaction-transact-sql). > [!NOTE] > `Try`/`Catch` exception handling should always be used when committing or rolling back a . Both `Commit` and generates an if the connection is terminated or if the transaction has already been rolled back on the server. For more information on SQL Server transactions, see [Transactions (Transact-SQL)](/sql/t-sql/language-elements/transactions-transact-sql). ## Examples The following example creates a and a . It also demonstrates how to use the , , and methods. The transaction is rolled back on any error. `Try`/`Catch` error handling is used to handle any errors when attempting to commit or roll back the transaction. [!code-csharp[SqlConnection_BeginTransaction Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction.cs#1)] ]]> An error occurred while trying to commit the transaction.The transaction has already been committed or rolled back. -or- The connection is broken. to release managed and unmanaged resources; to release only unmanaged resources.Releases the unmanaged resources used and optionally releases the managed resources. . ]]> Rolls back a transaction from a pending state. method is equivalent to the Transact-SQL ROLLBACK TRANSACTION statement. For more information, see [ROLLBACK TRANSACTION (Transact-SQL) ](/sql/t-sql/language-elements/rollback-transaction-transact-sql). The transaction can only be rolled back from a pending state (after has been called, but before is called). The transaction is rolled back in the event it is disposed before `Commit` or `Rollback` is called. > [!NOTE] > `Try`/`Catch` exception handling should always be used when rolling back a transaction. A `Rollback` generates an if the connection is terminated or if the transaction has already been rolled back on the server. For more information on SQL Server transactions, see [Transactions (Transact-SQL)](/sql/t-sql/language-elements/transactions-transact-sql). ## Examples The following example creates a and a . It also demonstrates how to use the , , and methods. The transaction is rolled back on any error. `Try`/`Catch` error handling is used to handle any errors when attempting to commit or roll back the transaction. [!code-csharp[SqlConnection_BeginTransaction Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction.cs#1)] ]]> An error occurred while trying to commit the transaction.The transaction has already been committed or rolled back. -or- The connection is broken. The name of the transaction to roll back, or the savepoint to which to roll back.Rolls back a transaction from a pending state, and specifies the transaction or savepoint name. method is equivalent to the Transact-SQL ROLLBACK TRANSACTION statement. For more information, see [Transactions (Transact-SQL)](/sql/t-sql/language-elements/transactions-transact-sql). The transaction can only be rolled back from a pending state (after has been called, but before is called). The transaction is rolled back if it is disposed before `Commit` or `Rollback` is called. > [!NOTE] > `Try`/`Catch` exception handling should always be used when rolling back a transaction. A `Rollback` generates an if the connection is terminated or if the transaction has already been rolled back on the server. For more information on SQL Server transactions, see [Transactions (Transact-SQL)](/sql/t-sql/language-elements/transactions-transact-sql). ## Examples The following example creates a and a . It also demonstrates how to use the , , and methods. The transaction is rolled back on any error. `Try`/`Catch` error handling is used to handle any errors when attempting to commit or roll back the transaction. [!code-csharp[SqlConnection_BeginTransaction2 Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction2.cs#1)] ]]> No transaction name was specified.The transaction has already been committed or rolled back. -or- The connection is broken. The name of the savepoint.Creates a savepoint in the transaction that can be used to roll back a part of the transaction, and specifies the savepoint name. method is equivalent to the Transact-SQL SAVE TRANSACTION statement. The value used in the `savePoint` parameter can be the same value used in the `transactionName` parameter of some implementations of the method. Savepoints offer a mechanism to roll back parts of transactions. You create a savepoint using the method, and then later call the method to roll back to the savepoint instead of rolling back to the start of the transaction. ]]> An error occurred while trying to commit the transaction.The transaction has already been committed or rolled back. -or- The connection is broken. Cache for storing result of signature verification of CMK Metadata Get signature verification result for given CMK metadata (KeystoreName, MasterKeyPath, allowEnclaveComputations) and a given signature Key Store name for CMK Key Path for CMK boolean indicating whether the key can be sent to enclave Signature for the CMK metadata null if the data is not found in cache otherwise returns true/false indicating signature verification success/failure Add signature verification result for given CMK metadata (KeystoreName, MasterKeyPath, allowEnclaveComputations) and a given signature in the cache Key Store name for CMK Key Path for CMK boolean indicating whether the key can be sent to enclave Signature for the CMK metadata result indicating signature verification success/failure Specifies how rows of data are sorted. To be added. The default. No sort order is specified.-1-1 Rows are sorted in ascending order.00 Rows are sorted in descending order.11 This class implements authenticated encryption algorithm with associated data as described in http://tools.ietf.org/html/draft-mcgrew-aead-aes-cbc-hmac-sha2-05. More specifically this implements AEAD_AES_256_CBC_HMAC_SHA256 algorithm. Algorithm Name Key size in bytes Block size in bytes. AES uses 16 byte blocks. Minimum Length of cipherText without authentication tag. This value is 1 (version byte) + 16 (IV) + 16 (minimum of 1 block of cipher Text) Minimum Length of cipherText. This value is 1 (version byte) + 32 (authentication tag) + 16 (IV) + 16 (minimum of 1 block of cipher Text) Cipher Mode. For this algorithm, we only use CBC mode. Padding mode. This algorithm uses PKCS7. Variable indicating whether this algorithm should work in Deterministic mode or Randomized mode. For deterministic encryption, we derive an IV from the plaintext data. For randomized encryption, we generate a cryptographically random IV. Algorithm Version. Column Encryption Key. This has a root key and three derived keys. The pool of crypto providers to use for encrypt/decrypt operations. Byte array with algorithm version used for authentication tag computation. Byte array with algorithm version size used for authentication tag computation. Initializes a new instance of SqlAeadAes256CbcHmac256Algorithm algorithm with a given key and encryption type Root encryption key from which three other keys will be derived Encryption Type, accepted values are Deterministic and Randomized. For Deterministic encryption, a synthetic IV will be genenrated during encryption For Randomized encryption, a random IV will be generated during encryption. Algorithm version Encryption Algorithm cell_iv = HMAC_SHA-2-256(iv_key, cell_data) truncated to 128 bits cell_ciphertext = AES-CBC-256(enc_key, cell_iv, cell_data) with PKCS7 padding. cell_tag = HMAC_SHA-2-256(mac_key, versionbyte + cell_iv + cell_ciphertext + versionbyte_length) cell_blob = versionbyte + cell_tag + cell_iv + cell_ciphertext Plaintext data to be encrypted Returns the ciphertext corresponding to the plaintext. Encryption Algorithm cell_iv = HMAC_SHA-2-256(iv_key, cell_data) truncated to 128 bits cell_ciphertext = AES-CBC-256(enc_key, cell_iv, cell_data) with PKCS7 padding. (optional) cell_tag = HMAC_SHA-2-256(mac_key, versionbyte + cell_iv + cell_ciphertext + versionbyte_length) cell_blob = versionbyte + [cell_tag] + cell_iv + cell_ciphertext Plaintext data to be encrypted Does the algorithm require authentication tag. Returns the ciphertext corresponding to the plaintext. Decryption steps 1. Validate version byte 2. Validate Authentication tag 3. Decrypt the message Decryption steps 1. Validate version byte 2. (optional) Validate Authentication tag 3. Decrypt the message Decrypts plain text data using AES in CBC mode cipher text data to be decrypted IV to be used for decryption Returns decrypted plain text data Prepares an authentication tag. Authentication Tag = HMAC_SHA-2-256(mac_key, versionbyte + cell_iv + cell_ciphertext + versionbyte_length) Encryption key class containing 4 keys. This class is used by SqlAeadAes256CbcHmac256Algorithm 1) root key - Main key that is used to derive the keys used in the encryption algorithm 2) encryption key - A derived key that is used to encrypt the plain text and generate cipher text 3) mac_key - A derived key that is used to compute HMAC of the cipher text 4) iv_key - A derived key that is used to generate a synthetic IV from plain text data. Key size in bits Encryption Key Salt format. This is used to derive the encryption key from the root key. MAC Key Salt format. This is used to derive the MAC key from the root key. IV Key Salt format. This is used to derive the IV key from the root key. This is only used for Deterministic encryption. Encryption Key MAC key IV Key The name of the algorithm this key will be used with. Derives all the required keys from the given root key Root key used to derive all the required derived keys Encryption key should be used for encryption and decryption MAC key should be used to compute and validate HMAC IV key should be used to compute synthetic IV from a given plain text This is a factory class for AEAD_AES_256_CBC_HMAC_SHA256 Factory classes caches the SqlAeadAes256CbcHmac256EncryptionKey objects to avoid computation of the derived keys Creates an instance of AeadAes256CbcHmac256Algorithm class with a given key Root key Encryption Type. Expected values are either Deterministic or Randomized. Encryption Algorithm. Represents AD authentication parameters passed by a driver to authentication providers. Gets the authentication method.The authentication method. The resource URIs.The resource URI. Gets the authority URI.The authority URI. Gets the user login name/ID.The user login name/ID. Gets the user password.The user password. Gets the connection ID.The connection ID. Gets the server name.The server name. Gets the database name.The database name. Gets the connection timeout value.The connection timeout value to be passed to Cancellation Token Source. One of the enumeration values that specifies the authentication method.The server name.The database name.The resource URI.The authority URI.The user login name/ID.The user password.The connection ID.The connection timeout value in seconds.Initializes a new instance of the class using the specified authentication method, server name, database name, resource URI, authority URI, user login name/ID, user password, connection ID and connection timeout value. AD authentication parameter builder. Implicitly converts to . Set user id. Set password. Set password. Set a specific connection id instead of using a random one. Set connection timeout. Defines the core behavior of authentication providers and provides a base class for derived classes. The authentication method.Gets an authentication provider by method. The authentication provider or if not found. To be added. The authentication method.The authentication provider.Sets an authentication provider by method. if the operation succeeded; otherwise, (for example, the existing provider disallows overriding). To be added. The authentication method.This method is called immediately before the provider is added to SQL drivers registry. Avoid performing long-waiting tasks in this method, since it can block other threads from accessing the provider registry. The authentication method.This method is called immediately before the provider is removed from the SQL drivers registry. For example, this method is called when a different provider with the same authentication method overrides this provider in the SQL drivers registry. Avoid performing long-waiting task in this method, since it can block other threads from accessing the provider registry. The authentication method.Indicates whether the specified authentication method is supported. if the specified authentication method is supported; otherwise, . To be added. The Active Directory authentication parameters passed by the driver to authentication providers.Acquires a security token from the authority.Represents an asynchronous operation that returns the AD authentication token.To be added. Returns number of trailing zeros using the supplied parameters. An 32-bit unsigned integer which will be combined with data2, data3, and data4 An 32-bit unsigned integer which will be combined with data1, data3, and data4 An 32-bit unsigned integer which will be combined with data1, data2, and data4 An 32-bit unsigned integer which will be combined with data1, data2, and data3 The number of decimal places OUT |The number of digits without trailing zeros Number of trailing zeros Multi-precision one super-digit divide in place. U = U / D, R = U % D (Length of U can decrease) InOut | U InOut | Number of items with non-zero value in U between 1 to 4 In | D Out | R Represents an AD authentication token. Gets the token expiration time.The token expiration time. Gets the token string.The token string. The access token.The token expiration time.Initializes a new instance of the class.The parameter is or empty. Constructor. Convert to driver's internal token class. Convert token bytes to string. Convert token string to bytes. SqlBatchCommand allows for the execution of multiple SQL commands in a SqlBatch. Initializes a new . and a SqlBatch, then adds multiple objects to the batch. It then executes the batch, creating a . The example reads through the results of the batch commands, writing them to the console. Finally, the example closes the and then the as the `using` blocks fall out of scope. [!code-csharp[SqlCommand Example#1](~/../sqlclient/doc/samples/SqlBatch_ExecuteReader.cs#1)] ]]> Initializes a new .The text of the .Indicates how the property is to be interpreted.A collection of objects is used to create the .The encryption setting. For more information, see [Always Encrypted](/sql/relational-databases/security/encryption/always-encrypted-database-engine). Gets or sets the text command to run against the data source.The text command to execute. The default value is an empty string (""). Gets or sets how the property is interpreted.One of the enumeration values that specifies how a command string is interpreted. The default is . One of the values, indicating options for statement execution and data retrieval. Gets the number of rows changed, inserted, or deleted by execution of this specific . The number of rows changed, inserted, or deleted. -1 for SELECT statements; 0 if no rows were affected or the statement failed. Gets the collection of objects.The parameters of the SQL statement or stored procedure. Gets the .The parameters of the Transact-SQL statement or stored procedure. The default is an empty collection. Not currently implemented. The encryption setting. For more information, see [Always Encrypted](/sql/relational-databases/security/encryption/always-encrypted-database-engine). Defines the mapping between a column in a instance's data source and a column in the instance's destination table. collection is empty - the columns are mapped implicitly based on ordinal position. For this to work, source and target schemas must match. If they do not, an will be thrown. If the collection is not empty, not every column present in the data source has to be specified. Those not mapped by the collection are ignored. You can refer to source and target columns by either name or ordinal. You can also mix by-name and by-ordinal column references in the same mappings collection. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the destination matches the number of columns in the source, and each destination column is in the same ordinal position as its corresponding source column, the column names do not match. objects are used to create a column map for the bulk copy. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMapping#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMapping.cs#1)] ]]> Name of the column being mapped in the destination database table. The string value of the property. and properties are mutually exclusive. The last value set takes precedence. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match. objects are used to create a column map for the bulk copy. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMappingDestinationColumn#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingDestinationColumn.cs#1)] ]]> Ordinal value of the destination column within the destination table. The integer value of the property, or -1 if the property has not been set. and properties are mutually exclusive. The last value set takes precedence. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match. objects are used to create a column map for the bulk copy. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMappingDestinationOrdinal#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingDestinationOrdinal.cs#1)] ]]> Name of the column being mapped in the data source. The string value of the property. and properties are mutually exclusive. The last value set takes precedence. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match. objects are used to create a column map for the bulk copy. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMappingDestinationColumn#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingDestinationColumn.cs#1)] ]]> The ordinal position of the source column within the data source. The integer value of the property. and properties are mutually exclusive. The last value set takes precedence. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match. objects are used to create a column map for the bulk copy. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMappingDestinationOrdinal#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingDestinationOrdinal.cs#1)] ]]> Parameterless constructor that initializes a new object. property or the property, and define the destination for the mapping using the property or the property. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match. objects are used to create a column map for the bulk copy. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMapping#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMapping.cs#1)] ]]> The name of the source column within the data source. The name of the destination column within the destination table. Creates a new column mapping, using column names to refer to source and destination columns. objects are used to create a column map for the bulk copy. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMapping#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMapping.cs#1)] ]]> The ordinal position of the source column within the data source. The name of the destination column within the destination table. Creates a new column mapping, using a column ordinal to refer to the source column and a column name for the target column. objects are used to create a column map for the bulk copy. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMappingOrdinalName#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingOrdinalName.cs#1)] ]]> The name of the source column within the data source. The ordinal position of the destination column within the destination table. Creates a new column mapping, using a column name to refer to the source column and a column ordinal for the target column. objects are used to create a column map for the bulk copy. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMappingNameOrdinal#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingNameOrdinal.cs#1)] ]]> The ordinal position of the source column within the data source. The ordinal position of the destination column within the destination table. Creates a new column mapping, using column ordinals to refer to source and destination columns. objects are used to create a column map for the bulk copy based on the ordinal positions of the columns. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMappingOrdinal#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingOrdinal.cs#1)] ]]> Collection of objects that inherits from . collection is empty - the columns are mapped implicitly based on ordinal position. For this to work, source and target schemas must match. If they do not, an is thrown. If the collection is not empty, not every column present in the data source has to be specified. Those not mapped by the collection are ignored. You can refer to source and target columns by either name or ordinal. You can mix by-name and by-ordinal column references in the same mappings collection. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match. are added to the for the object to create a column map for the bulk copy. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMappingCollection#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingCollection.cs#1)] ]]> The zero-based index of the to find.Gets the object at the specified index.A object.To be added. The object that describes the mapping to be added to the collection.Adds the specified mapping to the .A object. objects are used to create a column map for the bulk copy. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMapping#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMapping.cs)] ]]> The name of the source column within the data source.The name of the destination column within the destination table.Creates a new and adds it to the collection, using column names to specify both source and destination columns.A column mapping. is thrown. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match. The code creates a object by specifying the column names. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMappingCollection#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingCollection.cs#1)] ]]> The ordinal position of the source column within the data source.The name of the destination column within the destination table.Creates a new and adds it to the collection, using an ordinal for the source column and a string for the destination column.A column mapping. is thrown. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match. objects are used to create a column map for the bulk copy. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy_ColumnMappingIndexColName#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingIndexColName.cs#1)] ]]> The name of the source column within the data source.The ordinal position of the destination column within the destination table.Creates a new and adds it to the collection, using a column name to describe the source column and an ordinal to specify the destination column.A column mapping. is thrown. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match. objects are used to create a column map for the bulk copy. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMappingColNameIndex#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingColNameIndex.cs#1)] ]]> The ordinal position of the source column within the data source.The ordinal position of the destination column within the destination table.Creates a new and adds it to the collection, using ordinals to specify both source and destination columns.A column mapping. is thrown. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. Although the number of columns in the destination matches the number of columns in the source, the column names and ordinal positions do not match. objects are used to create a column map for the bulk copy using the ordinal position of the source and destination columns. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMappingCollectionOrdinal#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingCollectionOrdinal.cs#1)] ]]> Clears the contents of the collection. method is most commonly used when you use a single instance to process more than one bulk copy operation. If you create column mappings for one bulk copy operation, you must clear the after the method and before processing the next bulk copy. Performing several bulk copies using the same instance will usually be more efficient from a performance point of view than using a separate for each operation. ## Examples The following example performs two bulk copy operations. The first operation copies sales order header information, and the second copies sales order details. Although not strictly necessary in this example (because the ordinal positions of the source and destination columns do match), the example defines column mappings for each bulk copy operation. The method must be used after the first bulk copy is performed and before the next bulk copy's column mappings are defined. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMappingOrdersDetails#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingOrdersDetails.cs#1)] ]]> A valid object.Gets a value indicating whether a specified object exists in the collection. if the specified mapping exists in the collection; otherwise . The one-dimensional array that is the destination of the elements copied from . The array must have zero-based indexing.The zero-based index in at which copying begins.Copies the elements of the to an array of items, starting at a particular index. The object for which to search.Gets the index of the specified object.The zero-based index of the column mapping, or -1 if the column mapping is not found in the collection.To be added. Integer value of the location within the at which to insert the new . object to be inserted in the collection.Insert a new at the index specified.To be added. object to be removed from the collection.Removes the specified element from the . method is most commonly used when you use a single instance to process more than one bulk copy operation. If you create column mappings for one bulk copy operation, you must remove mappings that no longer apply after the method is called and before defining mapping for the next bulk copy. You can clear the entire collection by using the method, or remove mappings individually using the method or the method. Performing several bulk copies using the same instance will usually be more efficient from a performance point of view than using a separate for each operation. ## Examples The following example performs two bulk copy operations. The first operation copies sales order header information, and the second copies sales order details. Although not strictly necessary in this example (because the ordinal positions of the source and destination columns do match), the example defines column mappings for each bulk copy operation. Both bulk copies include a mapping for the **SalesOrderID**, so rather than clearing the entire collection between bulk copy operations, the example removes all mappings except for the **SalesOrderID** mapping and then adds the appropriate mappings for the second bulk copy operation. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMappingRemove#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingRemove.cs#1)] ]]> The zero-based index of the object to be removed from the collection.Removes the mapping at the specified index from the collection. method is most commonly used when you use a single instance to process more than one bulk copy operation. If you create column mappings for one bulk copy operation, you must remove mappings that no longer apply after the method is called and before defining mapping for the next bulk copy. You can clear the entire collection by using the method, or remove mappings individually using the method or the method. Performing several bulk copies using the same instance will usually be more efficient from a performance point of view than using a separate for each operation. ## Examples The following example performs two bulk copy operations. The first operation copies sales order header information, and the second copies sales order details. Although not strictly necessary in this example (because the ordinal positions of the source and destination columns do match), the example defines column mappings for each bulk copy operation. Both bulk copies include a mapping for the **SalesOrderID**, so rather than clearing the entire collection between bulk copy operations, the example removes all mappings except for the **SalesOrderID** mapping and then adds the appropriate mappings for the second bulk copy operation. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnMappingRemoveAt#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnMappingRemoveAt.cs#1)] ]]> Defines the sort order for a column in a instance's destination table, according to the clustered index on the table. collection is not empty, order hints can only be provided for valid destination columns which have been mapped. If a of Unspecified is given, an will be thrown. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. A SqlBulkCopyColumnOrderHint object is used to define the sort order for the ProductNumber destination column. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnOrderHint#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnOrderHint.cs#1)] ]]> The name of the destination column within the destination table. The sort order of the corresponding destination column. Creates a new column order hint for the specified destination column. [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnOrderHint#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnOrderHint.cs#1)] ]]> Name of the destination column in the destination table for which the hint is being provided. The string value of the property. will be thrown if a null or empty string is given. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. A SqlBulkCopyColumnOrderHint object is used to define the sort order for the ProductNumber destination column. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnOrderHintColumn#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnOrderHintColumn.cs#1)] ]]> The value is null or empty. The sort order of the destination column in the destination table. The SortOrder value of the property. will be thrown if a of Unspecified is given. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. A SqlBulkCopyColumnOrderHint object is used to define the sort order for the ProductNumber destination column. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnOrderHintSortOrder#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnOrderHintSortOrder.cs#1)] ]]> The sort order cannot be unspecified for a column order hint. Collection of objects that inherits from . collection is not empty, order hints can only be provided for valid destination columns which have been mapped. If a of Unspecified is given, an will be thrown. ## Examples The following example bulk copies data from a source table in the **AdventureWorks** sample database to a destination table in the same database. s are added to the of the object to specify order hints for the bulk copy operation. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnOrderHintCollection#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnOrderHintCollection.cs#1)] ]]> The zero-based index of the to find.Gets the object at the specified index.A object.To be added.The index must be non-negative and less than the size of the collection. The object that describes the order hint to be added to the collection.Adds the specified order hint to the .A object. [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnOrderHintCollectionAdd#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnOrderHintCollectionAdd.cs)] ]]> The value is null. The name of the destination column within the destination table.The sort order of the corresponding destination column.Creates a new and adds it to the collection.A column column order hint. by providing the destination column name and its sort order. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnOrderHintCollectionAdd2#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnOrderHintCollectionAdd2.cs#1)] ]]> Invoked before the collection is cleared using Clear(). Unregisters each order hint. A valid object.Gets a value indicating whether a specified object exists in the collection. if the specified column order hint exists in the collection; otherwise . The one-dimensional array that is the destination of the elements copied from . The array must have zero-based indexing.The zero-based index in at which copying begins.Copies the elements of the to an array of items, starting at a particular index. The object for which to search.Gets the index of the specified object.The zero-based index of the column order hint, or -1 if the column order hint is not found in the collection.To be added. Integer value of the location within the at which to insert the new . object to be inserted in the collection.Insert a new at the index specified.The order in which column order hints can be added is arbitrary.The index is less than zero or greater than the size of the collection.A null column order hint cannot be added to the collection. object to be removed from the collection.Removes the specified element from the . instance to process more than one bulk copy operation. If you create column order hints for one bulk copy operation, you must clear the after the method and before processing the next bulk copy. You can clear the entire collection by using the method, or remove hints individually using the Remove method or the method. Performing several bulk copies using the same instance will usually be more efficient from a performance point of view than using a separate for each operation. ## Examples The following example performs two bulk copy operations. The first operation copies sales order header information, and the second copies sales order details. The example defines a column order hint for the **OrderDate** column in the first bulk copy operation. The hint is removed before the second bulk copy operation. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ColumnOrderHintCollectionRemove#1](~/../sqlclient/doc/samples/SqlBulkCopy_ColumnOrderHintCollectionRemove.cs#1)] ]]> The value is null. Invoked before the order hint is removed using Remove() or RemoveAt(). Unregisters the order hint. Bitwise flag that specifies one or more options to use with an instance of . enumeration when you construct a instance to change how the methods for that instance behave. ## Examples The following console application demonstrates how to perform a bulk load that copies the value in the identity column of the source table to the corresponding column in the destination table, instead of generating a new value for each row's identity column. To see how the option changes the way the bulk load works, run the sample with the **dbo.BulkCopyDemoMatchingColumns** table empty. All rows load from the source. Next, run the sample again without emptying the table. An exception is thrown, and the code writes a message to the console window notifying you that rows were not added because of primary key violations. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.KeepIdentity#1](~/../sqlclient/doc/samples/SqlBulkCopy_KeepIdentity.cs)] ]]> Use the default values for all options. Preserve source identity values. When not specified, identity values are assigned by the destination. Check constraints while data is being inserted. By default, constraints are not checked. Obtain a bulk update lock for the duration of the bulk copy operation. When not specified, row locks are used. Preserve null values in the destination table regardless of the settings for default values. When not specified, null values are replaced by default values where applicable. When specified, cause the server to fire the insert triggers for the rows being inserted into the database. When specified, each batch of the bulk-copy operation will occur within a transaction. If you indicate this option and also provide a object to the constructor, an occurs. Reads off from the network buffer and caches bytes. Only reads one column value in the current row. Abstract base class for all TCE encryption algorithms. It exposes two functions 1. Encrypt - This function is used by SqlClient under the covers to transparently encrypt TCE enabled column data. 2. Decrypt - This function is used by SqlClient under the covers to transparently decrypt TCE enabled column data. Encrypts the plainText with a column encryption key Plain text value to be encrypted Decrypts the cipherText with a column encryption key Ciphertext value to be decrypted Abstract base class for all TCE encryption algorithm factory classes. Factory classes create instances of an encryption algorithm with a given key. At runtime when we determine a particular column is marked for TCE, based on the encryption algorithm we invoke the corresponding factory class and retrieve an object to an encryption algorithm. Creates an encryption algorithm with a given key. encryption key that should be passed to the encryption algorithm to be created Encryption Type, some algorithms will need this Encryption algorithm name. Needed for extracting version bits Return a newly created SqlClientEncryptionAlgorithm instance Implements a global directory of all the encryption algorithms registered with client. Get the registered list of algorithms as a comma separated list with algorithm names wrapped in single quotes. Gets the algorithm handle instance for a given algorithm and instantiates it using the provided key and the encryption type. Encryption types supported in TCE supported frameworks: .Net core 3.1 and .Net standard 2.1 and above Defines EventId for BeginExecute (Reader, Scalar, NonQuery, XmlReader). Defines EventId for EndExecute (Reader, Scalar, NonQuery, XmlReader). Defines EventId for Trace() events Defines EventId for ScopeEnter() events Defines EventId for ScopeLeave() events Defines EventId for NotificationScopeEnter() events Defines EventId for NotificationScopeLeave() events Defines EventId for NotificationScopeTrace() events Defines EventId for PoolerScopeEnter() events Defines EventId for PoolerScopeLeave() events Defines EventId for PoolerTrace() events Defines EventId for AdvancedTrace() events Defines EventId for AdvancedScopeEnter() events Defines EventId for AdvancedScopeLeave() events Defines EventId for AdvancedTraceBin() events Defines EventId for AdvancedTraceError() events Defines EventId for CorrelationTrace() events Defines EventId for StateDump() events Defines EventId for SNITrace() events Defines EventId for SNIEnterScope() events Defines EventId for SNIExitScope() events These represent logical groups of events that can be turned on and off independently Often each task has a keyword, but where tasks are determined by subsystem, keywords are determined by usefulness to end users to filter. Generally users don't mind extra events if they are not high volume, so grouping low volume events together in a single keywords is OK (users can post-filter by task if desired) The visibility of the enum has to be public, otherwise there will be an ArgumentException on calling related WriteEvent() method. The Keywords class has to be a nested class. Each keyword must be a power of 2. Captures Start/Stop events before and after command execution. Captures basic application flow trace events. Captures basic application scope entering and exiting events. Captures `SqlNotification` flow trace events. Captures `SqlNotification` scope entering and exiting events. Captures connection pooling flow trace events. Captures connection pooling scope trace events. Captures advanced flow trace events. Captures advanced flow trace events with additional information. Captures correlation flow trace events. Captures full state dump of `SqlConnection` Captures application flow traces from Managed networking implementation Captures scope trace events from Managed networking implementation Tasks supported by SqlClient's EventSource implementation Task that tracks SqlCommand execution. Task that tracks trace scope. Task that tracks trace scope. Task that tracks trace scope. Task that tracks trace scope. The number of actual connections that are being made to servers The number of actual disconnects that are being made to servers The number of connections we get from the pool The number of connections we return to the pool The number of connections that are not using connection pooling The number of connections that are not using connection pooling The number of connections that are managed by the connection pool The number of connections that are managed by the connection pool The number of unique connection strings The number of unique connection strings The number of unique connection strings waiting for pruning The number of unique connection strings waiting for pruning The number of connection pools The number of connection pools The number of connection pools The number of connection pools The number of connections currently in-use The number of connections currently in-use The number of connections currently available for use The number of connections currently available for use The number of connections currently waiting to be made ready for use The number of connections currently waiting to be made ready for use The number of connections we reclaim from GC'd external connections Represents a SQL client logger.To be added. The type to be logged.The logging method.The message to be logged.Logs information through a specified method of the current instance type.To be added. The type to be logged.The logging method.The message to be logged.Logs warning through a specified method of the current instance type. The type to be logged.The logging method.The message to be logged.Logs an error through a specified method of the current instance type.To be added. to log the message; otherwise, .The type to be logged.The logging method.The message to be logged.Logs the specified message if is . if the message is not logged; otherwise, .To be added. Gets a value that indicates whether bid tracing is enabled. if bid tracing is enabled; otherwise, .To be added. Provides a list of constants for use with the **GetSchema** method to retrieve metadata collections.To be added. A constant for use with the **GetSchema** method that represents the **Columns** collection.To be added. A constant for use with the **GetSchema** method that represents the **Databases** collection.To be added. A constant for use with the **GetSchema** method that represents the **ForeignKeys** collection.To be added. A constant for use with the **GetSchema** method that represents the **IndexColumns** collection.To be added. A constant for use with the **GetSchema** method that represents the **Indexes** collection.To be added. A constant for use with the **GetSchema** method that represents the **ProcedureParameters** collection.To be added. A constant for use with the **GetSchema** method that represents the **Procedures** collection.To be added. A constant for use with the **GetSchema** method that represents the **Tables** collection.To be added. A constant for use with the **GetSchema** method that represents the **UserDefinedTypes** collection.To be added. A constant for use with the **GetSchema** method that represents the **Users** collection.To be added. A constant for use with the **GetSchema** method that represents the **ViewColumns** collection.To be added. A constant for use with the **GetSchema** method that represents the **Views** collection.To be added. A constant for use with the **GetSchema** method that represents the **AllColumns** collection.To be added. A constant for use with the **GetSchema** method that represents the **ColumnSetColumns** collection.To be added. A constant for use with the **GetSchema** method that represents the **StructuredTypeMembers** collection.To be added. Base class containing raw key bytes for symmetric key algorithms. Some encryption algorithms can use the key directly while others derive sub keys from this. If an algorithm needs to derive more keys, have a derived class from this and use it in the corresponding encryption algorithm. The underlying key material Constructor that initializes the root key. root key Returns a copy of the plain text key This is needed for actual encryption/decryption. Computes SHA256 value of the plain text key bytes A string containing SHA256 hash of the root key Gets the length of the root key Returns the length of the root key Base class for all key store providers. A custom provider must derive from this class and override its member functions and then register it using , or . For details see, Always Encrypted. Gets or sets the lifespan of the decrypted column encryption key in the cache. Once the timespan has elapsed, the decrypted column encryption key is discarded and must be revalidated. . Any caching implementation should reference the value of this property before caching a column encryption key and not cache it if the value is zero. This will avoid duplicate caching and possible user confusion when they are trying to configure key caching. ]]> The master key path.The encryption algorithm.The encrypted column encryption key.Decrypts the specified encrypted value of a column encryption key. The encrypted value is expected to be encrypted using the column master key with the specified key path and using the specified algorithm. Returns . The decrypted column encryption key.To be added. The master key path.The encryption algorithm.The plaintext column encryption key.Encrypts a column encryption key using the column master key with the specified key path and using the specified algorithm.Returns . The encrypted column encryption key.To be added. The column master key path. to indicate that the column master key supports enclave computations; otherwise, .When implemented in a derived class, digitally signs the column master key metadata with the column master key referenced by the parameter. The input values used to generate the signature should be the specified values of the and parameters. The signature of the column master key metadata. method doesn't break applications that rely on an old API, it throws a exception by default. The method will be used by client tools that generate Column Master Keys (CMK) for customers. must be implemented by the corresponding key store providers that wish to use enclaves with [Always Encrypted](https://docs.microsoft.com/sql/relational-databases/security/encryption/always-encrypted-database-engine). ]]> In all cases. The column master key path.Indicates whether the column master key supports enclave computations.The signature of the column master key metadata.When implemented in a derived class, this method is expected to verify the specified signature is valid for the column master key with the specified key path and the specified enclave behavior. The default implementation throws NotImplementedException.When implemented in a derived class, the method is expected to return true if the specified signature is valid, or false if the specified signature is not valid. The default implementation throws NotImplementedException.To be added. Automatically generates single-table commands that are used to reconcile changes made to a with the associated SQL Server database. This class cannot be inherited. does not automatically generate the Transact-SQL statements required to reconcile changes made to a with the associated instance of SQL Server. However, you can create a object to automatically generate Transact-SQL statements for single-table updates if you set the property of the . Then, any additional Transact-SQL statements that you do not set are generated by the . The registers itself as a listener for events whenever you set the property. You can only associate one or object with each other at one time. To generate INSERT, UPDATE, or DELETE statements, the uses the property to retrieve a required set of metadata automatically. If you change the after the metadata has been retrieved, such as after the first update, you should call the method to update the metadata. The `SelectCommand` must also return at least one primary key or unique column. If none are present, an **InvalidOperation** exception is generated, and the commands are not generated. The also uses the , , and properties referenced by the . The user should call if one or more of these properties are modified, or if the itself is replaced. Otherwise the , , and properties retain their previous values. If you call , the is disassociated from the , and the generated commands are no longer used. ## Examples The following example uses the , along and , to select rows from a data source. The example is passed a connection string, a query string that is a Transact-SQL SELECT statement, and a string that is the name of the database table. The example then creates a . [!code-csharp[SqlCommandBuilder#1](~/../sqlclient/doc/samples/SqlCommandBuilder.cs#1)] ]]> Initializes a new instance of the class. To be added. The name of the . Initializes a new instance of the class with the associated object. registers itself as a listener for events that are generated by the specified in this property. When you create a new instance of , any existing associated with this is released. ]]> Sets or gets the for an instance of the class. A object. To be added. SqlServer only supports CatalogLocation.Start Sets or gets a string used as the catalog separator for an instance of the class. A string that indicates the catalog separator for use with an instance of the class. To be added. SqlServer only supports '.' Gets or sets a object for which Transact-SQL statements are automatically generated.A object. registers itself as a listener for events that are generated by the specified in this property. When you create a new instance of , any existing associated with this is released. ]]> Gets or sets the starting character or characters to use when specifying SQL Server database objects, such as tables or columns, whose names contain characters such as spaces or reserved tokens.The starting character or characters to use. The default is an empty string. [!NOTE] > Although you cannot change the or properties after an insert, update, or delete command has been generated, you can change their settings after calling the `Update` method of a DataAdapter. ]]> This property cannot be changed after an INSERT, UPDATE, or DELETE command has been generated. SqlServer only supports '.' Gets or sets the ending character or characters to use when specifying SQL Server database objects, such as tables or columns, whose names contain characters such as spaces or reserved tokens.The ending character or characters to use. The default is an empty string. [!NOTE] > Although you cannot change the or properties after an insert, update, or delete operation has been generated, you can change their settings after calling the `Update` method of a DataAdapter. ]]> This property cannot be changed after an insert, update, or delete command has been generated. Gets or sets the character to be used for the separator between the schema identifier and any other identifiers.The character to be used as the schema separator. Gets the automatically generated object required to perform insertions on the database.The automatically generated object required to perform insertions. method for informational or troubleshooting purposes because it returns the object to be executed. You can also use as the basis of a modified command. For example, you might call and modify the value, and then explicitly set that on the . After the Transact-SQL statement is first generated, the application must explicitly call if it changes the statement in any way. Otherwise, the will still be using information from the previous statement, which might not be correct. The Transact-SQL statements are first generated when the application calls either or . For more information, see [Generating Commands with CommandBuilders](/sql/connect/ado-net/generate-commands-with-commandbuilders). ]]> If , generate parameter names matching column names if possible. If , generate @p1, @p2, and so on.Gets the automatically generated object that is required to perform insertions on the database.The automatically generated object that is required to perform insertions. method for informational or troubleshooting purposes because it returns the object to be executed. You can also use as the basis of a modified command. For example, you might call and modify the value, and then explicitly set that on the . After the Transact-SQL statement is first generated, the application must explicitly call if it changes the statement in any way. Otherwise, the will still be using information from the previous statement, which might not be correct. The Transact-SQL statements are first generated when the application calls either or . The default behavior, when generating parameter names, is to use `@p1`, `@p2`, and so on for the various parameters. Passing `true` for the `useColumnsForParameterNames` parameter lets you force the to generate parameters based on the column names instead. This succeeds only if the following conditions are met: - The returned from the **GetSchema** method call and found in the collection has been specified and its length is equal to or greater than the generated parameter name. - The generated parameter name meets the criteria specified in the returned from the **GetSchema** method call and found in the collection regular expression. - A returned from the **GetSchema** method call and found in the collection is specified. For more information, see [Generating Commands with CommandBuilders](/sql/connect/ado-net/generate-commands-with-commandbuilders). ]]> Gets the automatically generated object required to perform updates on the database.The automatically generated object that is required to perform updates. method for informational or troubleshooting purposes because it returns the object to be executed. You can also use as the basis of a modified command. For example, you might call and modify the value, and then explicitly set that on the . After the Transact-SQL statement is first generated, the application must explicitly call if it changes the statement in any way. Otherwise, the will still be using information from the previous statement, which might not be correct. The Transact-SQL statements are first generated when the application calls either or . For more information, see [Generating Commands with CommandBuilders](/sql/connect/ado-net/generate-commands-with-commandbuilders). ]]> If , generate parameter names matching column names if possible. If , generate @p1, @p2, and so on.Gets the automatically generated object required to perform updates on the database.The automatically generated object required to perform updates. method for informational or troubleshooting purposes because it returns the object to be executed. You can also use as the basis of a modified command. For example, you might call and modify the value, and then explicitly set that on the . After the Transact-SQL statement is first generated, the application must explicitly call if it changes the statement in any way. Otherwise, the will still be using information from the previous statement, which might not be correct. The Transact-SQL statements are first generated when the application calls either or . The default behavior, when generating parameter names, is to use `@p1`, `@p2`, and so on for the various parameters. Passing `true` for the `useColumnsForParameterNames` parameter lets you force the to generate parameters based on the column names instead. This succeeds only if the following conditions are met: - The returned from the **GetSchema** method call and found in the collection has been specified and its length is equal to or greater than the generated parameter name. - The generated parameter name meets the criteria specified in the returned from the **GetSchema** method call and found in the collection regular expression. - A returned from the **GetSchema** method call and found in the collection is specified. For more information, see [Generating Commands with CommandBuilders](/sql/connect/ado-net/generate-commands-with-commandbuilders). ]]> Gets the automatically generated object required to perform deletions on the database.The automatically generated object required to perform deletions. method for informational or troubleshooting purposes because it returns the object to be executed. You can also use as the basis of a modified command. For example, you might call and modify the value, and then explicitly set that on the . After the SQL statement is first generated, the application must explicitly call if it changes the statement in any way. Otherwise, the will still be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either or . For more information, see [Generating Commands with CommandBuilders](/sql/connect/ado-net/generate-commands-with-commandbuilders). ]]> If , generate parameter names matching column names if possible. If , generate @p1, @p2, and so on.Gets the automatically generated object that is required to perform deletions on the database.The automatically generated object that is required to perform deletions. method for informational or troubleshooting purposes because it returns the object to be executed. You can also use as the basis of a modified command. For example, you might call and modify the value, and then explicitly set that on the . After the SQL statement is first generated, the application must explicitly call if it changes the statement in any way. Otherwise, the will still be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either or . The default behavior, when generating parameter names, is to use `@p1`, `@p2`, and so on for the various parameters. Passing `true` for the `useColumnsForParameterNames` parameter lets you force the to generate parameters based on the column names instead. This succeeds only if the following conditions are met: - The returned from the **GetSchema** method call and found in the collection has been specified and its length is equal to or greater than the generated parameter name. - The generated parameter name meets the criteria specified in the returned from the **GetSchema** method call and found in the collection regular expression. - A returned from the **GetSchema** method call and found in the collection is specified. For more information, see [Generating Commands with CommandBuilders](/sql/connect/ado-net/generate-commands-with-commandbuilders). ]]> To be added. To be added. To be added. To be added. To be added. To be added. To be added.To be added.To be added.To be added. To be added.To be added.To be added.To be added. To be added.To be added.To be added.To be added. The referencing the stored procedure from which the parameter information is to be derived. The derived parameters are added to the collection of the .Retrieves parameter information from the stored procedure specified in the and populates the collection of the specified object. with arbitrary Transact-SQL statements, such as a parameterized SELECT statement. For more information, see [Configuring parameters](/sql/connect/ado-net/configure-parameters). ]]> The command text is not a valid stored procedure name. To be added.To be added.To be added.To be added. To be added.To be added.To be added.To be added. To be added.To be added.To be added.To be added. To be added.To be added.To be added. The identifier that will have its embedded quotes removed.Given a quoted identifier, returns the correct unquoted form of that identifier. This includes correctly unescaping any embedded quotes in the identifier.The unquoted identifier, with embedded quotes properly unescaped.To be added.Connecting and Retrieving Data in ADO.NETUsing the .NET Framework Data Provider for SQL ServerOverview of the SqlClient driver These options are used to control encryption behavior of the communication between the server and the client. property. When converting from a boolean, a value of `true` converts to and a value of `false` converts to . When converting to a boolean, , , and `null` convert to `true` and converts `false`. ]]> Converts the specified string representation of a logical value to its equivalent. A string containing the value to convert. An object that is equivalent to contained in . Throws exception if provided is not convertible to type. Converts the specified string representation of a logical value to its equivalent and returns a value that indicates whether the conversion succeeded. A string containing the value to convert. An object that is equivalent to contained in . if conversion fails. if the parameter was converted successfully; otherwise, . This method does not throw an exception if conversion fails. Specifies that TLS encryption is optional when connecting to the server. If the server requires encryption, encryption will be negotiated. Specifies that TLS encryption is required when connecting to the server. If the server doesn't support encryption, the connection will fail. Enables and requires TDS 8.0, TLS encryption to the server. If the server doesn't support TDS 8.0, TLS encryption, the connection will fail. The boolean value to be used for implicit comparison. Enables implicit converstion of a boolean to a . A value of converts to . A value of converts to . The value to be used for implicit comparison. Enables implicit converstion of a to a boolean. and convert to . converts to . Returns the string value of . Compares the representation of to another . Returns the hash code of the value. Convert the value to SqlConnectionColumnEncryptionSetting. Convert the value to SqlConnectionAttestationProtocol Convert the value to SqlConnectionIPAddressPreference Provides a simple way to create and manage the contents of connection strings used by the class. class to build and modify connection strings. The class also makes it easy to manage connection strings stored in an application configuration file. The performs checks for valid key/value pairs. Therefore, you cannot use this class to create invalid connection strings; trying to add invalid pairs will throw an exception. The class maintains a fixed collection of synonyms and can translate from a synonym to the corresponding well-known key name. For example, when you use the **Item** property to retrieve a value, you can specify a string that contains any synonym for the key you need. For example, you can specify "Network Address", "addr", or any other acceptable synonym for this key within a connection string when you use any member that requires a string that contains the key name, such as the **Item** property or the method. See the property for a full list of acceptable synonyms. The **Item** property handles tries to insert malicious entries. For example, the following code, using the default Item property (the indexer, in C#) correctly escapes the nested key/value pair: ```vb Dim builder As New Microsoft.Data.SqlClient.SqlConnectionStringBuilder builder("Data Source") = "(local)" builder("Integrated Security") = True builder("Initial Catalog") = "AdventureWorks;NewValue=Bad" Console.WriteLine(builder.ConnectionString) ``` ```csharp Microsoft.Data.SqlClient.SqlConnectionStringBuilder builder = new Microsoft.Data.SqlClient.SqlConnectionStringBuilder(); builder["Data Source"] = "(local)"; builder["Integrated Security"] = true; builder["Initial Catalog"] = "AdventureWorks;NewValue=Bad"; Console.WriteLine(builder.ConnectionString); ``` The result is the following connection string that handles the invalid value in a safe manner: ``` Source=(local);Initial Catalog="AdventureWorks;NewValue=Bad"; Integrated Security=True ``` ## Examples The following console application builds connection strings for a SQL Server database. The code uses a class to create the connection string, and then passes the property of the instance to the constructor of the connection class. The example also parses an existing connection string and demonstrates various ways of manipulating the connection string's contents. > [!NOTE] > This example includes a password to demonstrate how works with connection strings. In your applications, we recommend that you use Windows Authentication. If you must use a password, do not include a hard-coded password in your application. [!code-csharp[SqlConnectionStringBuilder#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder.cs#1)] ]]> specific ordering for ConnectionString output construction Initializes a new instance of the class.To be added. The basis for the object's internal connection information. Parsed into name/value pairs. Invalid key names raise .Initializes a new instance of the class. The provided connection string provides the data for the instance's internal connection information. class provides a fixed internal collection of key/value pairs. Even if you supply only a small subset of the possible connection string values in the constructor, the object always provides default values for each key/value pair. When the `ConnectionString` property of the object is retrieved, the string contains only key/value pairs in which the value is not the default value for the item. ## Examples The following example supplies a simple SQL Server connection string in the object's constructor, and then iterates through all the key/value pairs within the object. Note that the collection provides default values for each item. Also note that the class converts synonyms for the well-known keys so that they are consistent with the well-known names. > [!NOTE] > This example includes a password to demonstrate how works with connection strings. In your applications, we recommend that you use Windows Authentication. If you must use a password, do not include a hard-coded password in your application. [!code-csharp[SqlConnectionStringBuilder3#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder3.cs#1)] ]]> Invalid key name within the connection string.Invalid value within the connection string (specifically, when a Boolean or numeric value was expected but not supplied).The supplied is not valid. The key of the item to get or set.Gets or sets the value associated with the specified key. In C#, this property is the indexer.The value associated with the specified key. contains a fixed-size dictionary, trying to add a key that does not exist within the dictionary throws a . ## Examples The following code, in a console application, creates a new and adds key/value pairs to its connection string, using the property. [!code-csharp[SqlConnectionStringBuilder2#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder2.cs#1)] ]]> is a null reference ( in Visual Basic).Tried to add a key that does not exist within the available keys.Invalid value within the connection string (specifically, a Boolean or numeric value was expected but not supplied). Declares the application workload type when connecting to a database in an SQL Server Availability Group. You can set the value of this property with . For more information about SqlClient support for Always On Availability Groups, see [SqlClient Support for High Availability, Disaster Recovery](/sql/connect/ado-net/sql/sqlclient-support-high-availability-disaster-recovery).Returns the current value of the property. Overview of the SqlClient driver Gets or sets the name of the application associated with the connection string.The name of the application. If no name has been supplied, "Framework Microsoft SqlClient Data Provider" when running on .NET Framework and "Core Microsoft SqlClient Data Provider" otherwise. and assigns a connection string in the object's constructor. The code displays the parsed and recreated version of the connection string, and then modifies the property of the object. Finally, the code displays the new connection string, including the new key/value pair. [!code-csharp[SqlConnectionStringBuilder.ApplicationName#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_ApplicationName.cs#1)] The sample displays the following text in the console window: ``` Original: Data Source=(local);Initial Catalog=AdventureWorks;Integrated Security=True ApplicationName="Core Microsoft SqlClient Data Provider" Modified: Data Source=(local);Initial Catalog=AdventureWorks;Integrated Security=True;Application Name="My Application" ``` ]]> To set the value to null, use . Gets or sets a string that contains the name of the primary data file. This includes the full path name of an attachable database.The value of the property, or if no value has been supplied. instance, and sets the `AttachDBFilename` property in order to specify the name of an attached data file. [!code-csharp[DataWorks SqlConnectionStringBuilder_AttachDBFilename#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_AttachDBFilename.cs#1)] ]]> To set the value to null, use .Working with Connection StringsOverview of the SqlClient driver The default wait time (in seconds) before terminating the attempt to execute a command and generating an error. The default is 30 seconds. The time in seconds to wait for the command to execute. The default is 30 seconds. connection string. Valid values are greater than or equal to 0 and less than or equal to 2147483647. ]]> The value set is less than 0. Gets or sets the length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.The value of the property, or 15 seconds if no value has been supplied. property, and then displays the new connection string. [!code-csharp[SqlConnectionStringBuilder_ConnectTimeout#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_ConnectTimeout.cs#1)] ]]> Gets or sets the language used for database server warning or error messages..The value of the property, or if no value has been supplied. To set the value to null, use . Gets or sets the name or network address of the instance of SQL Server to connect to.The value of the property, or if none has been supplied. \\ - tcp:\,\ The TCP format must start with the prefix "tcp:" and is followed by the database instance, as specified by a host name and an instance name. This format is not applicable when connecting to Azure SQL Database. TCP is automatically selected for connections to Azure SQL Database when no protocol is specified. The host name MUST be specified in one of the following ways: - NetBIOSName - IPv4Address - IPv6Address The instance name is used to resolve to a particular TCP/IP port number on which a database instance is hosted. Alternatively, specifying a TCP/IP port number directly is also allowed. If both instance name and port number are not present, the default database instance is used. The Named Pipes format is as follows: - np:\\\\\pipe\\ The Named Pipes format MUST start with the prefix "np:" and is followed by a named pipe name. The host name MUST be specified in one of the following ways: - NetBIOSName - IPv4Address - IPv6Address The pipe name is used to identify the database instance to which the .NET application will connect. If the value of the **Network** key is specified, the prefixes "tcp:" and "np:" should not be specified. **Note:** You can force the use of TCP instead of shared memory, either by prefixing **tcp:** to the server name in the connection string, or by using **localhost**. ## Examples The following example demonstrates that the class converts synonyms for the "Data Source" connection string key into the well-known key: [!code-csharp[SqlConnectionStringBuilder_DataSource#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_DataSource.cs#1)] ]]> To set the value to null, use . Gets or sets the service principal name (SPN) of the data source. The value of the property, or if none has been supplied. [!NOTE] > This property only applies when using Integrated Security mode, otherwise it is ignored. ]]> Gets or sets a value since version 5.0 or a value for the earlier versions that indicates whether TLS encryption is required for all data sent between the client and server.The value of the property. , or `true`, the server name (or IP address) in a server's TLS certificate must exactly match the server name (or IP address) specified in the connection string. Otherwise, the connection attempt will fail. For information about support for certificates whose subject starts with a wildcard character (*), see [Enable encrypted connections to the Database Engine](/sql/database-engine/configure-windows/enable-encrypted-connections-to-the-database-engine#certificate-requirements). > [!NOTE] > Starting from **version 4.0**, the default value of the property `Encrypt` is set to `true` while it is `false` for earlier versions. > [!NOTE] > Starting from **version 5.0**, the data type is updated to , and the default value of the `Encrypt` property is set to . ]]> Working with Connection StringsOverview of the SqlClient driver Gets or sets the host name to use when validating the server certificate for the connection. When not specified, the server name from the `Data Source` is used for certificate validation. (Only available in v5.0+) The value of the property, or if none has been supplied. [!NOTE] > This property only applies when using `Encrypt` in or mode, otherwise it is ignored. ]]> Gets or sets the path to a certificate file to match against the SQL Server TLS/SSL certificate for the connection. The accepted certificate formats are PEM, DER, and CER. If specified, the SQL Server certificate is checked by verifying if the `ServerCertificate` provided is an exact match. (Only available in v5.1+) The value of the property, or if none has been supplied. [!NOTE] > This property only applies when using `Encrypt` in or mode, otherwise it is ignored. ]]> Gets or sets the column encryption settings for the connection string builder.The column encryption settings for the connection string builder.This property enables or disables [Always Encrypted](/sql/relational-databases/security/encryption/always-encrypted-database-engine) functionality for the connection. Gets or sets the enclave attestation URL to be used with enclave based Always Encrypted.The enclave attestation URL. Gets or sets the value of Attestation Protocol.The attestation protocol. Gets or sets the IP address family preference when establishing TCP connections.Returns the IP address preference. Gets or sets a value that indicates whether the channel will be encrypted while bypassing walking the certificate chain to validate trust.A boolean. The default is `false`. Gets or sets a Boolean value that indicates whether the SQL Server connection pooler automatically enlists the connection in the creation thread's current transaction context.The value of the property, or if none has been supplied. Gets or sets the name or address of the partner server to connect to if the primary server is down.The value of the property, or if none has been supplied.To set the value to null, use . Gets or sets the service principal name (SPN) of the failover partner for the connection. The value of the property, or if none has been supplied. [!NOTE] > This property only applies when using Integrated Security mode, otherwise it is ignored. ]]> Gets or sets the name of the database associated with the connection.The value of the property, or if none has been supplied. class to add the name of the database to the connection string. The code displays the contents of the property, just to verify that the class was able to convert from the synonym ("Database") to the appropriate property value. [!code-csharp[SqlConnectionStringBuilder_InitialCatalog#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_InitialCatalog.cs#1)] ]]> To set the value to null, use . Gets or sets a Boolean value that indicates whether User ID and Password are specified in the connection (when ) or whether the current Windows account credentials are used for authentication (when ).The value of the property, or if none has been supplied. is a more secure way to specify credentials for a connection that uses SQL Server Authentication (`Integrated Security=false`). ## Examples The following example converts an existing connection string from using SQL Server Authentication to using integrated security. The example does its work by removing the user name and password from the connection string and then setting the property of the object. > [!NOTE] > This example includes a password to demonstrate how works with connection strings. In your applications, we recommend that you use Windows Authentication. If you must use a password, do not include a hard-coded password in your application. [!code-csharp[SqlConnectionStringBuilder_IntegratedSecurity#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_IntegratedSecurity.cs#1)] ]]> Gets or sets the authentication method used for [Connecting to SQL Database By Using Azure Active Directory Authentication](https://azure.microsoft.com/documentation/articles/sql-database-aad-authentication/#7-connect-to-your-database-by-using-azure-active-directory-identities).The authentication method of the connection string. Gets or sets the minimum time, in seconds, for the connection to live in the connection pool before being destroyed.The value of the property, or 0 if none has been supplied. Gets or sets the maximum number of connections allowed in the connection pool for this specific connection string.The value of the property, or 100 if none has been supplied. The number of reconnections attempted after identifying that there was an idle connection failure. This must be an integer between 0 and 255. The default value for non Azure endpoints is 1. For Azure SQL endpoints, the default is 2. Starting in version 5.x, for Azure SQL serverless or on demand endpoints, the default is 5 to improve connection success for connections to an idle or paused instance. Set to 0 to disable reconnecting on idle connection failures. An will be thrown if set to a value outside of the allowed range.The number of reconnections attempted after identifying that there was an idle connection failure. connection string. > [!NOTE] > Since version 5.x the default value for none Azure endpoints is 1 and for Azure SQL and Azure Synapse has increased to 2 and 5 to imporve the recovery against on high demand Azure endpoints. It should be detected first, and Synapse could be detected as a regular Azure SQL DB endpoint. ]]> Amount of time (in seconds) between each reconnection attempt after identifying that there was an idle connection failure. This must be an integer between 1 and 60. The default is 10 seconds.Amount of time (in seconds) between each reconnection attempt after identifying that there was an idle connection failure.Value is outside of the allowed range. connection string. This value is applied after the first reconnection attempt. When a broken connection is detected, the client immediately attempts to reconnect; this is the first reconnection attempt and only occurs if `ConnectRetryCount` is greater than 0. If the first reconnection attempt fails and `ConnectRetryCount` is greater than 1, the client waits `ConnectRetryInterval` to try the second and subsequent reconnection attempts. ]]> Gets or sets the minimum number of connections allowed in the connection pool for this specific connection string.The value of the property, or 0 if none has been supplied. When true, an application can maintain multiple active result sets (MARS). When false, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection. For more information, see [Multiple Active Result Sets (MARS)](https://msdn.microsoft.com//library/cfa084cz.aspx).The value of the property, or if none has been supplied. If your application is connecting to an AlwaysOn availability group (AG) on different subnets, setting MultiSubnetFailover=true provides faster detection of and connection to the (currently) active server. For more information about SqlClient support for Always On Availability Groups, see [SqlClient Support for High Availability, Disaster Recovery](/sql/connect/ado-net/sql/sqlclient-support-high-availability-disaster-recovery).Returns indicating the current value of the property. Gets or sets the size in bytes of the network packets used to communicate with an instance of SQL Server.The value of the property, or 8000 if none has been supplied. Gets or sets the password for the SQL Server account.The value of the property, or if none has been supplied. is a more secure way to specify credentials for a connection that uses SQL Server Authentication. If has not been set and you retrieve the value, the return value is . To reset the password for the connection string, pass null to the Item property. The password must be 128 characters or less. ## Examples The following example shows how to set . [!code-csharp[SqlConnectionStringBuilder_Password#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_Password.cs#1)] ]]> The password was incorrectly set to null. See code sample below. Gets or sets a Boolean value indicating if security-sensitive information, such as the password or access token, should be returned as part of the connection string on a connection created with this after that connection has ever been in an open state. This property should only be set to if your application has a specific need to read the password out of an already-opened database connection. The default value of is the more secure setting; using for this property opens your application to security risks such as accidentally logging or tracing the database password.The value of the property, or if none has been supplied. The blocking period behavior for a connection pool.The available blocking period settings. enumeration for available settings. ]]> Gets or sets a Boolean value that indicates whether the connection will be pooled or explicitly opened every time that the connection is requested.The value of the property, or if none has been supplied. Gets or sets a Boolean value that indicates whether replication is supported using the connection.The value of the property, or false if none has been supplied. Gets or sets a string value that indicates how the connection maintains its association with an enlisted transaction.The value of the property, or `Implicit Unbind` if none has been supplied. control how a binds to an enlisted . The following table shows the possible values for the property: |Value|Description| |-----------|-----------------| |Implicit Unbind|The default. Causes the connection to detach from the transaction when it ends. After detaching, additional requests on the connection are performed in autocommit mode. The property is not checked when executing requests while the transaction is active. After the transaction has ended, additional requests are performed in autocommit mode.| |Explicit Unbind|Causes the connection to remain attached to the transaction until the connection is closed or until is called with a `null` (`Nothing` in Visual Basic) value. An is thrown if is not the enlisted transaction or if the enlisted transaction is not active. This behavior enforces the strict scoping rules required for support.| ]]> Gets or sets a string value that indicates the type system the application expects.The following table shows the possible values for the property: Value Description SQL Server 2005 Uses the SQL Server 2005 type system. No conversions are made for the current version of ADO.NET. SQL Server 2008 Uses the SQL Server 2008 type system. Latest Use the latest version than this client-server pair can handle. This will automatically move forward as the client and server components are upgraded. Gets or sets the user ID to be used when connecting to SQL Server.The value of the property, or if none has been supplied. is a more secure way to specify credentials for a connection that uses SQL Server Authentication. The user ID must be 128 characters or less. ]]> To set the value to null, use . Gets or sets a value that indicates whether to redirect the connection from the default SQL Server Express instance to a runtime-initiated instance running under the account of the caller.The value of the property, or if none has been supplied. [!NOTE] > This feature is available only with the SQL Server Express Edition. For more information on user instances, see [SQL Server Express User Instances](/sql/connect/ado-net/sql/sql-server-express-user-instances). ]]> To set the value to null, use . Gets or sets the name of the workstation connecting to SQL Server.The value of the property, or if none has been supplied. To set the value to null, use . Gets a value that indicates whether the has a fixed size. in every case, because the supplies a fixed-size collection of key/value pairs.To be added.Working with Connection StringsOverview of the SqlClient driver Gets an that contains the keys in the .An that contains the keys in the . is unspecified, but it is the same order as the associated values in the returned by the property. ## Examples The following console application example creates a new . The code loops through the returned by the property displaying the key/value pairs. [!code-csharp[SqlConnectionStringBuilder_Keys#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_Keys.cs#1)] ]]> Gets an that contains the values in the .An that contains the values in the . is unspecified, but it is the same order as the associated keys in the returned by the property. Because each instance of the always contains the same fixed set of keys, the property always returns the values corresponding to the fixed set of keys, in the same order as the keys. ## Examples The following example first creates a new , and then iterates through all the values within the object. [!code-csharp[SqlConnectionStringBuilder_Values#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_Values.cs#1)] ]]> Clears the contents of the instance. method removes all key/value pairs from the , and resets all corresponding properties. This includes setting the property to 0, and setting the property to an empty string. ## Examples The following example demonstrates calling the method. This example populates the with some key/value pairs, and then calls the method and shows the results. [!code-csharp[DataWorks SqlConnectionStringBuilder_Clear#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_Clear.cs#1)] ]]> The key to locate in the .Determines whether the contains a specific key.true if the contains an element that has the specified key; otherwise, false. contains a fixed-size collection of key/value pairs, the method determines only if a particular key name is valid. ## Examples The following example creates a instance, sets some of its properties, and then tries to determine whether various keys exist within the object by calling the **ContainsKey** method. [!code-csharp[SqlConnectionStringBuilder_ContainsKey#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_ContainsKey.cs#1)] The example displays the following output in the console window: ``` Connection string = Data Source=(local);Initial Catalog=AdventureWorks;Integrated Security=True True True True False ``` ]]> is null ( in Visual Basic) The key of the key/value pair to be removed from the connection string in this .Removes the entry with the specified key from the instance. if the key existed within the connection string and was removed; if the key did not exist. instance. Because the maintains a fixed-size collection of key/value pairs, calling the method simply resets the value of the key/value pair back to its default value. Because the collection of keys supported by the is fixed, every item within the collection has a known default value. The following table lists the keys, and the value for each when the is first initialized, or after the method has been called. |Key|Default value| |---------|-------------------| |Application Name|"Framework Microsoft SqlClient Data Provider" when running on .NET Framework. "Core Microsoft SqlClient Data Provider" otherwise.| |AttachDBFilename|Empty string| |Connection Timeout|15| |Context Connection(Obsolete)|False| |Current Language|Empty string| |Data Source|Empty string| |Encrypt|False in versions prior to 4.0, True in versions 4.0 and up| |Enlist|True| |Failover Partner|Empty string| |Initial Catalog|Empty string| |Integrated Security|False| |Load Balance Timeout|0| |Max Pool Size|100| |Min Pool Size|0| |MultipleActiveResultSets|False| |Network Library|Empty string| |Packet Size|8000| |Password|Empty string| |Persist Security Info|False| |Pooling|True| |Replication|False| |Transaction Binding|Implicit Unbind| |User ID|Empty string| |User Instance|False| |Workstation ID|Empty string| ## Examples The following example converts an existing connection string from using Windows Authentication to using integrated security. The example works by removing the user name and password from the connection string, and then setting the property of the object. > [!NOTE] > This example includes a password to demonstrate how works with connection strings. In your applications, we recommend that you use Windows Authentication. If you must use a password, do not include a hard-coded password in your application. [!code-csharp[SqlConnectionStringBuilder_Remove#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_Remove.cs#1)] The example displays the following text in the console window: ``` Original: Data Source=(local);Initial Catalog=AdventureWorks;User ID=ab;Password= a1Pass@@11 Modified: Data Source=(local);Initial Catalog=AdventureWorks;Integrated Security=True Database = AdventureWorks ``` ]]> is null ( in Visual Basic) The key to locate in the .Indicates whether the specified key exists in this instance. if the contains an entry with the specified key; otherwise, . method. ]]> The key of the item to retrieve.The value corresponding to .Retrieves a value corresponding to the supplied key from this . if was found within the connection string; otherwise, . method lets developers safely retrieve a value from a without needing to verify that the supplied key name is a valid key name. Because **TryGetValue** does not raise an exception when you call it, passing in a nonexistent key, you do not have to look for a key before retrieving its value. Calling **TryGetValue** with a nonexistent key will place the value null (`Nothing` in Visual Basic) in the `value` parameter. ## Examples The following example demonstrates the behavior of the **TryGetValue** method. [!code-csharp[SqlConnectionStringBuilder_TryGetValue#1](~/../sqlclient/doc/samples/SqlConnectionStringBuilder_TryGetValue.cs#1)] The sample displays the following results: ``` Data Source=(local) Trusted_Connection=True Unable to retrieve value for 'InvalidKey' Unable to retrieve value for null key. ``` ]]> contains a null value ( in Visual Basic). provides a more secure way to specify the password for a login attempt using SQL Server Authentication. is comprised of a user id and a password that will be used for SQL Server Authentication. The password in a object is of type . cannot be inherited. Windows Authentication () remains the most secure way to log in to a SQL Server database. to get or set a connection's object. Use to change the password for a object. For information on how a object affects connection pool behavior, see [SQL Server Connection Pooling (ADO.NET)](/sql/connect/ado-net/sql-server-connection-pooling). An exception will be raised if a non-null object is used in a connection with any of the following connection string keywords: - `Integrated Security = true` - `Password` - `User ID` The following sample connects to a SQL Server database using : ``` // change connection string in the APP.CONFIG file // then use the following snippet: using System.Configuration; System.Windows.Controls.TextBox txtUserId = new System.Windows.Controls.TextBox(); System.Windows.Controls.PasswordBox txtPwd = new System.Windows.Controls.PasswordBox(); Configuration config = Configuration.WebConfigurationManager.OpenWebConfiguration(Null); ConnectionStringSettings connString = config.ConnectionStrings.ConnectionString["MyConnString"]; using (SqlConnection conn = new SqlConnection(connString.ConnectionString)) { SecureString pwd = txtPwd.SecurePassword; pwd.MakeReadOnly(); SqlCredential cred = new SqlCredential(txtUserId.Text, pwd); conn.Credential = cred; conn.Open(); } ``` ]]> The user id.The password; a value marked as read-only. Passing a read/write parameter will raise an .Creates an object of type . value is allowed. An attempt to pass a null parameter in the constructor will raise an exception. ]]> Overview of the SqlClient driver Gets the user ID component of the object.The user ID component of the object.To be added.Overview of the SqlClient driver Gets the password component of the object.The password component of the object.To be added.Overview of the SqlClient driver Represents a set of data commands and a database connection that are used to fill the and update a SQL Server database. This class cannot be inherited. , serves as a bridge between a and SQL Server for retrieving and saving data. The provides this bridge by mapping , which changes the data in the to match the data in the data source, and , which changes the data in the data source to match the data in the , using the appropriate Transact-SQL statements against the data source. The update is performed on a by-row basis. For every inserted, modified, and deleted row, the method determines the type of change that has been performed on it (`Insert`, `Update`, or `Delete`). Depending on the type of change, the `Insert`, `Update`, or `Delete` command template executes to propagate the modified row to the data source. When the fills a , it creates the necessary tables and columns for the returned data if they do not already exist. However, primary key information is not included in the implicitly created schema unless the property is set to . You may also have the create the schema of the , including primary key information, before filling it with data using `FillSchema`. For more information, see [Adding Existing Constraints to a DataSet](/sql/connect/ado-net/add-existing-constraints-to-dataset). is used in conjunction with and to increase performance when connecting to a SQL Server database. > [!NOTE] > If you are using SQL Server stored procedures to edit or delete data using a `DataAdapter`, make sure that you do not use SET NOCOUNT ON in the stored procedure definition. This causes the rows affected count returned to be zero, which the `DataAdapter` interprets as a concurrency conflict. In this event, a will be thrown. The also includes the , , , , and properties to facilitate the loading and updating of data. When an instance of is created, the read/write properties are set to initial values. For a list of these values, see the constructor. The , , and are generic templates that are automatically filled with individual values from every modified row through the parameters mechanism. For every column that you propagate to the data source on , a parameter should be added to the `InsertCommand`, `UpdateCommand`, or `DeleteCommand`. The property of the object should be set to the name of the column. This setting indicates that the value of the parameter is not set manually, but is taken from the particular column in the currently processed row. > [!NOTE] > An will occur if the method is called and the table contains a user-defined type that is not available on the client computer. For more information, see [CLR User-Defined Types](/sql/relational-databases/clr-integration-database-objects-user-defined-types/clr-user-defined-types). ## Examples The following example uses the , , and to select records from a database and populate a with the selected rows. The filled is then returned. To accomplish this, the method is passed an initialized , a connection string, and a query string that is a Transact-SQL SELECT statement. [!code-csharp[SqlDataAdapter_SelectCommand Example#1](~/../sqlclient/doc/samples/SqlDataAdapter_SelectCommand.cs#1)] ]]> Initializes a new instance of the class. is created, the following read/write properties are set to the following initial values. |Properties|Initial value| |----------------|-------------------| ||`MissingMappingAction.Passthrough`| ||`MissingSchemaAction.Add`| You can change the value of any of these properties through a separate call to the property. ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlDataAdapter.SqlDataAdapter Example#1](~/../sqlclient/doc/samples/SqlDataAdapter_SqlDataAdapter.cs#1)] ]]> A that is a Transact-SQL SELECT statement or stored procedure and is set as the property of the .Initializes a new instance of the class with the specified as the property. constructor sets the property to the value specified in the `selectCommand` parameter. When an instance of is created, the following read/write properties are set to the following initial values. |Properties|Initial value| |----------------|-------------------| ||`MissingMappingAction.Passthrough`| ||`MissingSchemaAction.Add`| You can change the value of any of these properties through a separate call to the property. When (or any of the other command properties) is assigned to a previously created , the is not cloned. The maintains a reference to the previously created object. ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlDataAdapter_SqlDataAdapter1 Example#1](~/../sqlclient/doc/samples/SqlDataAdapter_SqlDataAdapter1.cs#1)] ]]> A that is a Transact-SQL SELECT statement or stored procedure to be used by the property of the .The connection string. If your connection string does not use , you can use and to pass the user ID and password more securely than by specifying the user ID and password as text in the connection string.Initializes a new instance of the class with a and a connection string. constructor uses the `selectCommandText` parameter to set the property. The will create and maintain the connection created with the `selectConnectionString` parameter. When an instance of is created, the following read/write properties are set to the following initial values. |Properties|Initial value| |----------------|-------------------| ||`MissingMappingAction.Passthrough`| ||`MissingSchemaAction.Add`| You can change the value of any of these properties through a separate call to the property. ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlDataAdapter_SqlDataAdapter2 Example#1](~/../sqlclient/doc/samples/SqlDataAdapter_SqlDataAdapter2.cs#1)] ]]> A that is a Transact-SQL SELECT statement or stored procedure to be used by the property of the .A that represents the connection. If your connection string does not use , you can use to pass the user ID and password more securely than by specifying the user ID and password as text in the connection string.Initializes a new instance of the class with a and a object. opens and closes a if it is not already open. This can be useful in an application that must call the method for two or more objects. If the is already open, you must explicitly call **Close** or **Dispose** to close it. When an instance of is created, the following read/write properties are set to the following initial values. |Properties|Initial value| |----------------|-------------------| ||`MissingMappingAction.Passthrough`| ||`MissingSchemaAction.Add`| You can change the value of either of these properties through a separate call to the property. ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlDataAdapter_SqlDataAdapter3 Example#1](~/../sqlclient/doc/samples/SqlDataAdapter_SqlDataAdapter3.cs#1)] ]]> Gets or sets a Transact-SQL statement or stored procedure to delete records from the data set.A used during to delete records in the database that correspond to deleted rows in the . , if this property is not set and primary key information is present in the , the can be generated automatically if you set the property and use the . Then, any additional commands that you do not set are generated by the . This generation logic requires key column information to be present in the . For more information, see [Generating Commands with CommandBuilders](/sql/connect/ado-net/generate-commands-with-commandbuilders). When is assigned to a previously created , the is not cloned. The maintains a reference to the previously created object. For every column that you propagate to the data source on , a parameter should be added to the `InsertCommand`, `UpdateCommand`, or `DeleteCommand`. The `SourceColumn` property of the parameter should be set to the name of the column. This indicates that the value of the parameter is not set manually, but is taken from the particular column in the currently processed row. ## Examples The following example creates a and sets the , , , and properties. It assumes you have already created a object. [!code-csharp[SqlDataAdapter#1](~/../sqlclient/doc/samples/SqlDataAdapter.cs#1)] ]]> For a description of this member, see .An that is used during to delete records in the data source for deleted rows in the data set. instance is cast to an interface. ]]> Gets or sets a Transact-SQL statement or stored procedure to insert new records into the data source.A used during to insert records into the database that correspond to new rows in the . , if this property is not set and primary key information is present in the , the can be generated automatically if you set the property and use the . Then, any additional commands that you do not set are generated by the . This generation logic requires key column information to be present in the . For more information, see [Generating Commands with CommandBuilders](/sql/connect/ado-net/generate-commands-with-commandbuilders). When is assigned to a previously created , the is not cloned. The maintains a reference to the previously created object. If execution of this command returns rows, these rows can be added to the depending on how you set the **UpdatedRowSource** property of the object. For every column that you propagate to the data source on , a parameter should be added to `InsertCommand`, `UpdateCommand`, or `DeleteCommand`. The `SourceColumn` property of the parameter should be set to the name of the column. This indicates that the value of the parameter is not set manually, but is taken from the particular column in the currently processed row. ## Examples The following example creates a and sets the , , , and properties. It assumes you have already created a object. [!code-csharp[SqlDataAdapter#1](~/../sqlclient/doc/samples/SqlDataAdapter.cs#1)] ]]> For a description of this member, see .An that is used during to insert records in the data source for new rows in the data set. instance is cast to an interface. ]]> Gets or sets a Transact-SQL statement or stored procedure used to select records in the data source.A used during to select records from the database for placement in the . is assigned to a previously created , the is not cloned. The maintains a reference to the previously created object. If the does not return any rows, no tables are added to the , and no exception is raised. ## Examples The following example creates a and sets the , , , and properties. It assumes you have already created a object. [!code-csharp[SqlDataAdapter#1](~/../sqlclient/doc/samples/SqlDataAdapter.cs#1)] ]]> For a description of this member, see .An that is used during to select records from data source for placement in the data set. instance is cast to an interface. ]]> Gets or sets a Transact-SQL statement or stored procedure used to update records in the data source.A used during to update records in the database that correspond to modified rows in the . , if this property is not set and primary key information is present in the , the can be generated automatically if you set the property and use the . Then, any additional commands that you do not set are generated by the . This generation logic requires key column information to be present in the . For more information, see [Generating Commands with CommandBuilders](/sql/connect/ado-net/generate-commands-with-commandbuilders). When is assigned to a previously created , the is not cloned. The maintains a reference to the previously created object. > [!NOTE] > If execution of this command returns rows, the updated rows may be merged with the depending on how you set the **UpdatedRowSource** property of the object. For every column that you propagate to the data source on , a parameter should be added to `InsertCommand`, `UpdateCommand`, or `DeleteCommand`. The `SourceColumn` property of the parameter should be set to the name of the column. This indicates that the value of the parameter is not set manually, but taken from the particular column in the currently processed row. ## Examples The following example creates a and sets the , , and properties. It assumes you have already created a object. [!code-csharp[SqlDataAdapter#1](~/../sqlclient/doc/samples/SqlDataAdapter.cs#1)] ]]> For a description of this member, see .An that is used during to update records in the data source for modified rows in the data set. instance is cast to an interface. ]]> Gets or sets the number of rows that are processed in each round-trip to the server.The number of rows to process per-batch. Value is Effect 0 There is no limit on the batch size. 1 Disables batch updating. >1 Changes are sent using batches of operations at a time. When setting this to a value other than 1, all the commands associated with the have to have their **UpdatedRowSource** property set to or . An exception is thrown otherwise. property to update a data source with changes from a . This can increase application performance by reducing the number of round-trips to the server. Executing an extremely large batch could decrease performance. Therefore, you should test for the optimum batch size setting before implementing your application. An is thrown if the value is set to a number less than zero. ]]> To be added.To be added.To be added.To be added. To be added.To be added. To be added.To be added.To be added. To be added.To be added.To be added.To be added.To be added. To be added.To be added.To be added.To be added.To be added.To be added. To be added.To be added. To be added.To be added. For a description of this member, see .A new object that is a copy of the current instance. instance is cast to an interface. ]]> To be added.To be added.To be added.To be added.To be added.To be added.To be added. To be added.To be added.To be added.To be added.To be added.To be added.To be added. Occurs during after a command is executed against the data source. The attempt to update is made, so the event fires. , there are two events that occur per data row updated. The order of execution is as follows: 1. The values in the are moved to the parameter values. 2. The event is raised. 3. The command executes. 4. If the command is set to `FirstReturnedRecord`, the first returned result is placed in the . 5. If there are output parameters, they are placed in the . 6. The event is raised. 7. is called. ## Examples The following example shows how to use both the and events. The event returns this output: event args: (command=Microsoft.Data.SqlClient.SqlCommand commandType=2 status=0) The event returns this output: event args: (command=Microsoft.Data.SqlClient.SqlCommand commandType=2 recordsAffected=1 row=System.Data.DataRow[37] status=0) [!code-csharp[SqlDataAdapter_RowUpdated Example#1](~/../sqlclient/doc/samples/SqlDataAdapter_RowUpdated.cs#1)] ]]> Occurs during before a command is executed against the data source. The attempt to update is made, so the event fires. , there are two events that occur per data row updated. The order of execution is as follows: 1. The values in the are moved to the parameter values. 2. The event is raised. 3. The command executes. 4. If the command is set to `FirstReturnedRecord`, the first returned result is placed in the . 5. If there are output parameters, they are placed in the . 6. The event is raised. 7. is called. ## Examples The following example shows how to use both the and events. The event returns this output: event args: (command=Microsoft.Data.SqlClient.SqlCommand commandType=2 status=0) The event returns this output: event args: (command=Microsoft.Data.SqlClient.SqlCommand commandType=2 recordsAffected=1 row=System.Data.DataRow[37] status=0) [!code-csharp[SqlDataAdapter_RowUpdated Example#1](~/../sqlclient/doc/samples/SqlDataAdapter_RowUpdated.cs#1)] ]]> To be added.To be added.To be added. To be added.To be added.To be added. The object represents a query notification dependency between an application and an instance of SQL Server. An application can create a object and register to receive notifications via the event handler. is ideal for caching scenarios, where your ASP.NET application or middle-tier service needs to keep certain information cached in memory. allows you to receive notifications when the original data in the database changes so that the cache can be refreshed. To set up a dependency, you need to associate a object to one or more objects. To receive notifications, you need to subscribe to the event. For more information about the requirements for creating queries for notifications, see [Working with Query Notifications](/sql/relational-databases/native-client/features/working-with-query-notifications). > [!NOTE] > was designed to be used in ASP.NET or middle-tier services where there is a relatively small number of servers having dependencies active against the database. It was not designed for use in client applications, where hundreds or thousands of client computers would have objects set up for a single database server. If you are developing an application where you need reliable sub-second notifications when data changes, review the sections [Planning an Efficient Query Notifications Strategy](https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms187528(v=sql.105)#planning-an-efficient-query-notifications-strategy) and [Alternatives to Query Notifications](https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms187528(v=sql.105)#alternatives-to-query-notifications) in the [Planning for Notifications](https://docs.microsoft.com/previous-versions/sql/sql-server-2008-r2/ms187528(v%3dsql.105)) article. For more information, see [Query Notifications in SQL Server](/sql/connect/ado-net/sql/query-notifications-sql-server) and [Building Notification Solutions](https://docs.microsoft.com/previous-versions/sql/sql-server-2005/ms171065(v%3dsql.90)). > [!NOTE] > The event may be generated on a different thread from the thread that initiated command execution. Query notifications are supported only for SELECT statements that meet a list of specific requirements. ]]> Creates a new instance of the class with the default settings. object using the default Service Broker service name and time-out. At some point after construction, you must use the method to associate one or more commands to this object. Query notifications are supported only for SELECT statements that meet a list of specific requirements. For more information, see [SQL Server Service Broker](/sql/database-engine/configure-windows/sql-server-service-broker) and [Working with Query Notifications](/sql/connect/oledb/features/working-with-query-notifications). ]]> The object to associate with this object. The constructor will set up a object and bind it to the command.Creates a new instance of the class and associates it with the parameter. class, and binds it to a object. Query notifications are supported only for SELECT statements that meet a list of specific requirements. For more information, see [SQL Server Service Broker](/sql/database-engine/configure-windows/sql-server-service-broker) and [Working with Query Notifications](/sql/connect/oledb/features/working-with-query-notifications). ]]> The parameter is NULL.The object already has a object assigned to its property, and that is not associated with this dependency. The object to associate with this object. The constructor sets up a object and bind it to the command.The notification request options to be used by this dependency. to use the default service.The time-out for this notification in seconds. The default is 0, indicating that the server's time-out should be used.Creates a new instance of the class, associates it with the parameter, and specifies notification options and a time-out value. The parameter is NULL.The time-out value is less than zero.The object already has a object assigned to its property and that is not associated with this dependency. An attempt was made to create a **SqlDependency** instance from within SQLCLR. Gets a value that indicates whether one of the result sets associated with the dependency has changed.A Boolean value indicating whether one of the result sets has changed. event, you can check the property to determine if the query results have changed. The property does not necessarily imply a change in the data. Other circumstances, such as time-out expired and failure to set the notification request, also generate a change event. ]]> Gets a value that uniquely identifies this instance of the class.A string representation of a GUID that is generated for each instance of the class. property is used to uniquely identify a given instance. ]]> Occurs when a notification is received for any of the commands associated with this object. occurs when the results for the associated command change. If you are not using , you can check the property to determine whether the query results have changed. The event does not necessarily imply a change in the data. Other circumstances, such as time-out expired and failure to set the notification request, also generate . ]]> A object containing a statement that is valid for notifications.Associates a object with this instance. The parameter is null.The object already has a object assigned to its property, and that is not associated with this dependency. The connection string for the instance of SQL Server from which to obtain change notifications.Starts the listener for receiving dependency change notifications from the instance of SQL Server specified by the connection string. if the listener initialized successfully; if a compatible listener already exists. for receiving dependency notifications from the instance of SQL Server specified by the `connectionString` parameter. This method may be called more than once with different connection strings for multiple servers. For additional remarks, see . ]]> The parameter is NULL.The parameter is the same as a previous call to this method, but the parameters are different. The method was called from within the CLR.The caller does not have the required code access security (CAS) permission.A subsequent call to the method has been made with an equivalent parameter with a different user, or a user that does not default to the same schema. Also, any underlying **SqlClient** exceptions. The connection string for the instance of SQL Server from which to obtain change notifications.An existing SQL Server Service Broker queue to be used. If , the default queue is used.Starts the listener for receiving dependency change notifications from the instance of SQL Server specified by the connection string using the specified SQL Server Service Broker queue. if the listener initialized successfully; if a compatible listener already exists. for receiving dependency notifications from the instance of SQL Server specified by the `connectionString` parameter. This method may be called more than once with different connection strings for multiple servers. If no queue name is specified, creates a temporary queue and service in the server that is used for the entire process, even if the process involves more than one . The queue and service are automatically removed upon application shutdown. For additional remarks, see . ]]> The parameter is NULL.The parameter is the same as a previous call to this method, but the parameters are different. The method was called from within the CLR.The caller does not have the required code access security (CAS) permission.A subsequent call to the method has been made with an equivalent parameter but a different user, or a user that does not default to the same schema. Also, any underlying **SqlClient** exceptions. Connection string for the instance of SQL Server that was used in a previous call.Stops a listener for a connection specified in a previous call. if the listener was completely stopped; if the was unbound from the listener, but there are is at least one other using the same listener. method must be called for each call. A given listener only shuts down fully when it receives the same number of requests as requests. ]]> The parameter is NULL.The method was called from within SQLCLR.The caller does not have the required code access security (CAS) permission.An underlying **SqlClient** exception occurred. Connection string for the instance of SQL Server that was used in a previous call.The SQL Server Service Broker queue that was used in a previous call.Stops a listener for a connection specified in a previous call. if the listener was completely stopped; if the was unbound from the listener, but there is at least one other using the same listener. method must be called for each call. A given listener only shuts down fully when it receives the same number of requests as requests. ]]> The parameter is NULL.The method was called from within SQLCLR.The caller does not have the required code access security (CAS) permission.And underlying **SqlClient** exception occurred. Encapsulates the state of a secure session between SqlClient and an enclave inside SQL Server, which can be used for computations on encrypted columns protected with Always Encrypted.To be added. Gets the session ID.The session ID.To be added. Gets the symmetric key that SqlClient uses to encrypt all the information it sends to the enclave using the session.The symmetric key.To be added. Deep copy the array into a new array The symmetric key used to encrypt all the information sent using the session.The session ID.Instantiates a new instance of the class.To be added. is . has zero length. Assert that the supplied object is an instance of a SQL User-Defined Type (UDT). Object instance to be tested. This method is only compiled with debug builds, and it a helper method for the GetComValueFromSqlVariant method defined in this class. The presence of the SqlUserDefinedTypeAttribute on the object's type is used to determine if the object is a UDT instance (if present it is a UDT, else it is not). If sqlValue is null. Callers must ensure the object is non-null. contains binary data, before using this field check newBinRented to see if you can take the field array or whether you should allocate and copy contains binary data, before using this field check newBinRented to see if you can take the field array or whether you should allocate and copy Collects information relevant to a warning or error returned by SQL Server. is created and managed by the , which in turn is created by the class. Messages with a severity level of 10 or less are informational and indicate problems caused by mistakes in information that a user has entered. Severity levels from 11 through 16 are generated by the user, and can be corrected by the user. Severity levels from 17 through 25 indicate software or hardware errors. When a level 17, 18, or 19 error occurs, you can continue working, although you might not be able to execute a particular statement. The remains open when the severity level is 19 or less. When the severity level is 20 or greater, the server usually closes the . However, the user can reopen the connection and continue. In both cases, a is generated by the method executing the command. For more information on errors generated by SQL Server, see [Cause and Resolution of Database Engine Errors](https://msdn.microsoft.com/library/ms365262.aspx). For more information about severity levels, see [Database Engine Error Severities](https://msdn.microsoft.com/library/ms164086.aspx). ## Examples The following example displays each within the collection. [!code-csharp[SqlError_ToString Example#1](~/../sqlclient/doc/samples/SqlError_ToString.cs#1)] ]]> Gets the complete text of the error message.The complete text of the error. , and the stack trace. For example: SqlError:UserId or Password not valid. \ ## Examples The following example displays each within the collection. [!code-csharp[SqlError_ToString Example#1](~/../sqlclient/doc/samples/SqlError_ToString.cs#1)] ]]> Gets the name of the provider that generated the error.The name of the provider that generated the error. within the collection. [!code-csharp[SqlError.State Example#1](~/../sqlclient/doc/samples/SqlError_State.cs#1)] ]]> Gets a number that identifies the type of error.The number that identifies the type of error.
This number corresponds to an entry in the `master.dbo.sysmessages` table.|Typically greater than 0|No| |Connection timeout|-2|0|Yes (Number = 258)| |Communication error (non-LocalDB)|Win32 error code|0|Yes (Number = Win32 error code)| |Communication error (LocalDB)|Win32 error code|0|No| |Encryption capability mismatch|20|0|No| |Failed to start LocalDB|Win32 error code|0|No| |Read-only routing failure|0|0|No| |Server had severe error processing query|0|0|No| |Processed cancellation while parsing results|0|0|No| |Failed to create user instance|0|0|No| For more information on errors generated by SQL Server, see [Database Engine Events and Errors](/sql/relational-databases/errors-events/database-engine-events-and-errors). ## Examples The following example displays each within the collection. [!code-csharp[SqlError.State Example#1](~/../sqlclient/doc/samples/SqlError_State.cs#1)] ]]>
Some error messages can be raised at multiple points in the code for the Database Engine. For example, an 1105 error can be raised for several different conditions. Each specific condition that raises an error assigns a unique state code.The state code. within the collection. [!code-csharp[SqlError.State Example#1](~/../sqlclient/doc/samples/SqlError_State.cs#1)] ]]> Gets the severity level of the error returned from SQL Server.A value from 1 to 25 that indicates the severity level of the error. The default is 0. remains open when the severity level is 19 or less. When the severity level is 20 or greater, the server usually closes the . However, the user can reopen the connection and continue. In both cases, a is generated by the method executing the command. For more information on errors generated by SQL Server, see [Database Engine Events and Errors](/sql/relational-databases/errors-events/database-engine-events-and-errors). ## Examples The following example displays each within the collection. [!code-csharp[SqlError_State Example#1](~/../sqlclient/doc/samples/SqlError_State.cs#1)] ]]> Gets the name of the instance of SQL Server that generated the error.The name of the instance of SQL Server. within the collection. [!code-csharp[SqlError.State Example#1](~/../sqlclient/doc/samples/SqlError_State.cs#1)] ]]> Gets the text describing the error.The text describing the error. For more information on errors generated by SQL Server, see Database Engine Events and Errors. within the collection. [!code-csharp[SqlError.State Example#1](~/../sqlclient/doc/samples/SqlError_State.cs#1)] ]]> Gets the name of the stored procedure or remote procedure call (RPC) that generated the error.The name of the stored procedure or RPC. For more information on errors generated by SQL Server, see Database Engine Events and Errors. within the collection. [!code-csharp[SqlError.State Example#1](~/../sqlclient/doc/samples/SqlError_State.cs#1)] ]]> Gets the line number within the Transact-SQL command batch or stored procedure that contains the error.The line number within the Transact-SQL command batch or stored procedure that contains the error. within the collection. [!code-csharp[SqlError.State Example#1](~/../sqlclient/doc/samples/SqlError_State.cs#1)] ]]> Collects all errors generated by the .NET Framework Data Provider for SQL Server. This class cannot be inherited. to collect instances of the class. always contains at least one instance of the class. ## Examples The following example displays each within the collection. [!code-csharp[SqlError_ToString Example#1](~/../sqlclient/doc/samples/SqlError_ToString.cs#1)] ]]> The to copy elements into.The index from which to start copying into the parameter.Copies the elements of the collection into an , starting at the specified index.To be added.The sum of and the number of elements in the collection is greater than the of the .The is .The is not valid for . The to copy the elements into.The index from which to start copying into the parameter.Copies the elements of the collection into a , starting at the specified index.To be added.The sum of and the number of elements in the collection is greater than the length of the .The is .The is not valid for . Gets the number of errors in the collection.The total number of errors in the collection. within the collection. [!code-csharp[SqlError_ToString Example#1](~/../sqlclient/doc/samples/SqlError_ToString.cs#1)] ]]> For a description of this member, see .An object that can be used to synchronize access to the . instance is cast to an interface. ]]> For a description of this member, see . if access to the is synchronized (thread safe); otherwise, . instance is cast to an interface. ]]> The zero-based index of the error to retrieve.Gets the error at the specified index.A that contains the error at the specified index. within the collection. [!code-csharp[SqlError_ToString Example#1](~/../sqlclient/doc/samples/SqlError_ToString.cs#1)] ]]> Index parameter is outside array bounds. Returns an enumerator that iterates through the .An for the . The exception that is thrown when SQL Server returns a warning or error. This class cannot be inherited. always contains at least one instance of . Messages that have a severity level of 10 or less are informational and indicate problems caused by mistakes in information that a user has entered. Severity levels from 11 through 16 are generated by the user, and can be corrected by the user. Severity levels from 17 through 25 indicate software or hardware errors. When a level 17, 18, or 19 error occurs, you can continue working, although you might not be able to execute a particular statement. The remains open when the severity level is 19 or less. When the severity level is 20 or greater, the server ordinarily closes the . However, the user can reopen the connection and continue. In both cases, a is generated by the method executing the command. For information about the warning and informational messages sent by SQL Server, see [Database Engine Events and Errors](/sql/relational-databases/errors-events/database-engine-events-and-errors). The class maps to SQL Server severity. The following is general information on handling exceptions. Your code should catch exceptions to prevent the application from crashing and to allow displaying a relevant error message to the user. You can use database transactions to ensure that the data is consistent regardless of what happens in the client application (including a crash). Features like System.Transaction.TransactionScope or the BeginTransaction method (in System.Data.OleDb.OleDbConnection, System.Data.ODBC.ODBCConnection, and Microsoft.Data.SqlClient.SqlConnection) ensure consistent data regardless of exceptions raised by a provider. Transactions can fail, so catch failures and retry the transaction. Note that beginning with .NET Framework 4.5, can return an inner . The exception class of a .NET Framework data provider reports provider-specific errors. For example System.Data.Odbc has OdbcException, System.Data.OleDb has OleDbException, and Microsoft.Data.SqlClient has SqlException. For the best level of error detail, catch these exceptions and use the members of these exception classes to get details of the error. In addition to the provider-specific errors, .NET Framework data provider types can raise .NET Framework exceptions such as System.OutOfMemoryException and System.Threading.ThreadAbortException. Recovery from these exceptions may not be possible. Bad input can cause a .NET Framework data provider type to raise an exception such as System.ArgumentException or System.IndexOutOfRangeException. Calling a method at the wrong time can raise System.InvalidOperationException. So, in general, write an exception handler that catches any provider specific exceptions as well as exceptions from the common language runtime. These can be layered as follows: ```csharp try { // code here } catch (SqlException odbcEx) { // Handle more specific SqlException exception here. } catch (Exception ex) { // Handle generic ones here. } ``` Or: ```csharp try { // code here } catch (Exception ex) { if (ex is SqlException) { // Handle more specific SqlException exception here. } else { // Handle generic ones here. } } ``` It is also possible for a .NET Framework data provider method call to fail on a thread pool thread with no user code on the stack. In this case, and when using asynchronous method calls, you must register the event to handle those exceptions and avoid application crash. ## Examples The following example generates a and then displays the exception. [!code-csharp[SqlException_Errors1 Example#1](~/../sqlclient/doc/samples/SqlException_Errors1.cs#1)] ]]> Gets a collection of one or more objects that give detailed information about exceptions generated by the .NET Framework Data Provider for SQL Server.The collected instances of the class. class always contains at least one instance of the class. This is a wrapper for . For more information on SQL Server engine errors, see [Database Engine Events and Errors](/sql/relational-databases/errors-events/database-engine-events-and-errors). ## Examples The following example displays each within the collection. [!code-csharp[SqlError_ToString Example#1](~/../sqlclient/doc/samples/SqlError_ToString.cs#1)] ]]> Represents the client connection ID. For more information, see Data Tracing in ADO.NET.The client connection ID. . ]]> Gets the severity level of the error returned from the .NET Framework Data Provider for SQL Server.A value from 1 to 25 that indicates the severity level of the error. remains open when the severity level is 19 or less. When the severity level is 20 or greater, the server ordinarily closes the . However, the user can reopen the connection and continue. In both cases, a is generated by the method executing the command. For information about the warning and informational messages sent by SQL Server, see the Troubleshooting section of the SQL Server documentation. This is a wrapper for the property of the first in the property. If is `null`, the [`default`](https://docs.microsoft.com/dotnet/csharp/language-reference/builtin-types/default-values) value for `byte` is returned. ## Examples The following example displays each within the collection. [!code-csharp[SqlException_Errors2 Example#1](~/../sqlclient/doc/samples/SqlException_Errors2.cs#1)] ]]> Gets the line number within the Transact-SQL command batch or stored procedure that generated the error.The line number within the Transact-SQL command batch or stored procedure that generated the error. property of the first in the property. If is `null`, the [`default`](https://docs.microsoft.com/dotnet/csharp/language-reference/builtin-types/default-values) value for `int` is returned. ## Examples The following example displays each within the collection. [!code-csharp[SqlException_Errors2 Example#1](~/../sqlclient/doc/samples/SqlException_Errors2.cs#1)] ]]> Gets a number that identifies the type of error.The number that identifies the type of error. property of the first in the property. If is `null`, the [`default`](https://docs.microsoft.com/dotnet/csharp/language-reference/builtin-types/default-values) value for `int` is returned. For more information on SQL Server engine errors, see [Database Engine Events and Errors](/sql/relational-databases/errors-events/database-engine-events-and-errors). ## Examples The following example displays each within the collection. [!code-csharp[SqlException_Errors2 Example#1](~/../sqlclient/doc/samples/SqlException_Errors2.cs#1)] ]]> Gets the name of the stored procedure or remote procedure call (RPC) that generated the error.The name of the stored procedure or RPC. property of the first in the property. If is `null`, the [`default`](https://docs.microsoft.com/dotnet/csharp/language-reference/builtin-types/default-values) value for `string` is returned. ## Examples The following example displays each within the collection. [!code-csharp[SqlException_Errors2 Example#1](~/../sqlclient/doc/samples/SqlException_Errors2.cs#1)] ]]> Gets the name of the computer that is running an instance of SQL Server that generated the error.The name of the computer running an instance of SQL Server. property of the first in the property. If is `null`, the [`default`](https://docs.microsoft.com/dotnet/csharp/language-reference/builtin-types/default-values) value for `string` is returned. ## Examples The following example displays each within the collection. [!code-csharp[SqlException_Errors2 Example#1](~/../sqlclient/doc/samples/SqlException_Errors2.cs#1)] ]]> Gets a numeric error code from SQL Server that represents an error, warning or "no data found" message. For more information about how to decode these values, see Database Engine Events and Errors.The number representing the error code. property of the first in the property. If is `null`, the [`default`](https://docs.microsoft.com/dotnet/csharp/language-reference/builtin-types/default-values) value for `byte` is returned. ## Examples The following example displays each within the collection. [!code-csharp[SqlException_Errors2 Example#1](~/../sqlclient/doc/samples/SqlException_Errors2.cs#1)] ]]> Gets the name of the provider that generated the error.The name of the provider that generated the error. property of the first in the property. ## Examples The following example displays each within the collection. [!code-csharp[SqlException_Errors2 Example#1](~/../sqlclient/doc/samples/SqlException_Errors2.cs#1)] ]]> Returns a string that represents the current object, and includes the client connection ID (for more information, see ).A string that represents the current object.. , which includes the client connection ID: ```csharp using Microsoft.Data.SqlClient; using System; public class A { public static void Main() { SqlConnection connection = new SqlConnection(); connection.ConnectionString = "Data Source=a_valid_server;Initial Catalog=Northwinda;Integrated Security=true"; try { connection.Open(); } catch (SqlException p) { Console.WriteLine("{0}", p.ClientConnectionId); Console.WriteLine("{0}", p.ToString()); } connection.Close(); } } ``` The following Visual Basic sample is functionally equivalent to the previous (C#) sample: ```vb Imports Microsoft.Data.SqlClient Imports System Module Module1 Sub Main() Dim connection As New SqlConnection() connection.ConnectionString = "Data Source=a_valid_server;Initial Catalog=Northwinda;Integrated Security=true" Try connection.Open() Catch p As SqlException Console.WriteLine("{0}", p.ClientConnectionId) Console.WriteLine("{0}", p.ToString()) End Try connection.Close() End Sub End Module ``` ]]> Provides data for the event. event contains a collection which contains the warnings sent from the server. An event is generated when a SQL Server message with a severity level of 10 or less occurs. ]]> Gets the collection of warnings sent from the server.The collection of warnings sent from the server.To be added. Gets the full text of the error sent from the database.The full text of the error. property of the first in the collection. ]]> Gets the name of the object that generated the error.The name of the object that generated the error. property of the first in the collection. ]]> Retrieves a string representation of the event.A string representing the event.To be added. The source of the event.A object that contains the event data.Represents the method that will handle the event of a . delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see [Handling and Raising Events](/dotnet/standard/events/). ]]> This function is needed for those times when it is impossible to determine the server's transaction level, unless the user's arguments were parsed - which is something we don't want to do. An example when it is impossible to determine the level is after a rollback. Represents the set of arguments passed to the notification event handler.To be added. value that indicates whether this notification is generated because of an actual change, or by the subscription. value that indicates the reason for the notification event. This may occur because the data in the store actually changed, or the notification became invalid (for example, it timed out). value that indicates the source that generated the notification.Creates a new instance of the object.To be added. Gets a value that indicates whether this notification is generated because of an actual change, or by the subscription.A value indicating whether the notification was generated by a change or a subscription.To be added. Gets a value that indicates the reason for the notification event, such as a row in the database being modified or a table being truncated.The notification event reason. Gets a value that indicates the source that generated the notification, such as a change to the query data or the database's state.The source of the notification.To be added. This enumeration provides additional information about the different notifications that can be received by the dependency event handler. enumeration is referenced by an instance of the class. ]]> One or more tables were truncated. Data was changed by an INSERT statement. Data was changed by an UPDATE statement. Data was changed by a DELETE statement. An underlying object related to the query was dropped. An underlying server object related to the query was modified. The server was restarted (notifications are sent during restart.). An internal server error occurred. A SELECT statement that cannot be notified or was provided. A statement was provided that cannot be notified (for example, an UPDATE statement). The SET options were not set appropriately at subscription time. The statement was executed under an isolation mode that was not valid (for example, Snapshot). The object has expired. Fires as a result of server resource pressure. A previous statement has caused query notifications to fire under the current transaction. The subscribing query causes the number of templates on one of the target tables to exceed the maximum allowable limit. Used to distinguish the server-side cause for a query notification firing. Used when the info option sent by the server was not recognized by the client. The object already fired, and new commands cannot be added to it. Indicates the source of the notification received by the dependency event handler. class. Query notifications are supported only for SELECT statements that meet a list of specific requirements. For more information, see [SQL Server Service Broker](/sql/database-engine/configure-windows/sql-server-service-broker) and [Working with Query Notifications](/sql/connect/oledb/features/working-with-query-notifications). ]]> Data has changed; for example, an insert, update, delete, or truncate operation occurred. The subscription time-out expired. A database object changed; for example, an underlying object related to the query was dropped or modified. The database state changed; for example, the database related to the query was dropped or detached. A system-related event occurred. For example, there was an internal error, the server was restarted, or resource pressure caused the invalidation. The Transact-SQL statement is not valid for notifications; for example, a SELECT statement that could not be notified or a non-SELECT statement was executed. The run-time environment was not compatible with notifications; for example, the isolation level was set to snapshot, or one or more SET options are not compatible. A run-time error occurred during execution. Internal only; not intended to be used in your code. Used when the source option sent by the server was not recognized by the client. A client-initiated notification occurred, such as a client-side time-out or as a result of attempting to add a command to a dependency that has already fired. Describes the different notification types that can be received by an event handler through the parameter. enumeration is referenced by an instance of the class. This information is provided when a notification event is fired with the class. ]]> Data on the server being monitored changed. Use the item to determine the details of the change. There was a failure to create a notification subscription. Use the object's item to determine the cause of the failure. Used when the type option sent by the server was not recognized by the client. Represents a parameter to a and optionally its mapping to columns. This class cannot be inherited. For more information on parameters, see [Configuring parameters](/sql/connect/ado-net/configure-parameters). [!NOTE] > Nameless, also called ordinal, parameters are not supported by the .NET Framework Data Provider for SQL Server. For more information, along with additional sample code demonstrating how to use parameters, see [Commands and Parameters](/sql/connect/ado-net/commands-parameters). ## Examples The following example creates multiple instances of through the collection within the . These parameters are used to select data from the data source and put the data in the . This example assumes that a and a have already been created by using the appropriate schema, commands, and connection. For more information and additional examples on using parameters, see [Retrieving and Modifying Data in ADO.NET](/sql/connect/ado-net/retrieving-modifying-data) and [Configuring parameters](/sql/connect/ado-net/configure-parameters). [!code-csharp[SqlParameterCollection_Add6](~/../sqlclient/doc/samples/SqlParameterCollection_Add6.cs#1)] ]]> Initializes a new instance of the class. and sets some of its properties. [!code-csharp[SqlParameter_SqlParameter Example#1](~/../sqlclient/doc/samples/SqlParameter_SqlParameter.cs#1)] ]]> The name of the parameter to map.One of the values.Initializes a new instance of the class that uses the parameter name and the data type. are inferred from the value of the `dbType` parameter. ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlParameter_SqlParameter2 Example#1](~/../sqlclient/doc/samples/SqlParameter_SqlParameter2.cs#1)] ]]> The value supplied in the parameter is an invalid back-end data type. The name of the parameter to map.An that is the value of the .Initializes a new instance of the class that uses the parameter name and a value of the new . in the `value` parameter, the is inferred from the Microsoft .NET Framework type of the . Use caution when you use this overload of the constructor to specify integer parameter values. Because this overload takes a `value` of type , you must convert the integral value to an type when the value is zero, as the following C# example demonstrates. ```csharp Parameter = new SqlParameter("@pname", (object)0); ``` If you do not perform this conversion, the compiler assumes that you are trying to call the constructor overload. ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlParameter_SqlParameter6 Example#1](~/../sqlclient/doc/samples/SqlParameter_SqlParameter6.cs#1)] ]]> The name of the parameter to map.One of the values.The length of the parameter.Initializes a new instance of the class that uses the parameter name, the , and the size. and sets some of its properties. [!code-csharp[SqlParameter_SqlParameter4 Example#1](~/../sqlclient/doc/samples/SqlParameter_SqlParameter4.cs#1)] ]]> The value supplied in the parameter is an invalid back-end data type. The name of the parameter to map.One of the values.The length of the parameter.The name of the source column () if this is used in a call to >.Initializes a new instance of the class that uses the parameter name, the , the size, and the source column name. and sets some of its properties. [!code-csharp[SqlParameter_SqlParameter5 Example#1](~/../sqlclient/doc/samples/SqlParameter_SqlParameter5.cs#1)] ]]> The value supplied in the parameter is an invalid back-end data type. The name of the parameter to map.One of the values.The length of the parameter.One of the values. if the value of the field can be null; otherwise, .The total number of digits to the left and right of the decimal point to which is resolved.The total number of decimal places to which is resolved.The name of the source column () if this is used in a call to .One of the values.An that is the value of the .Initializes a new instance of the class that uses the parameter name, the type of the parameter, the size of the parameter, a , the precision of the parameter, the scale of the parameter, the source column, a to use, and the value of the parameter. are inferred from the value of the `dbType` parameter if they are not explicitly set in the `size` and `precision` parameters. ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlParameter_SqlParameter1 Example#1](~/../sqlclient/doc/samples/SqlParameter_SqlParameter1.cs#1)] ]]> The value supplied in the parameter is an invalid back-end data type. The name of the parameter to map.One of the values.The length of the parameter.One of the values.The total number of digits to the left and right of the decimal point to which is resolved.The total number of decimal places to which is resolved.The name of the source column () if this is used in a call to >.One of the values. if the source column is nullable; if it is not.An that is the value of the .The name of the database where the schema collection for this XML instance is located.The owning relational schema where the schema collection for this XML instance is located.The name of the schema collection for this parameter.Initializes a new instance of the class that uses the parameter name, the type of the parameter, the length of the parameter the direction, the precision, the scale, the name of the source column, one of the values, a Boolean for source column mapping, the value of the , the name of the database where the schema collection for this XML instance is located, the owning relational schema where the schema collection for this XML instance is located, and the name of the schema collection for this parameter. and are inferred from the value of the `dbType` parameter if they are not explicitly set in the `size` and `precision` parameters. ]]> Get or set the encryption related metadata of this SqlParameter. Should be set to a non-null value only once. Indicates if the parameter encryption metadata received by sp_describe_parameter_encryption. For unencrypted parameters, the encryption metadata should still be sent (and will indicate that no encryption is needed). Returns the normalization rule version number as a byte Gets or sets the object that defines how string comparisons should be performed for this parameter.A object that defines string comparison for this parameter.To be added. Gets the name of the database where the schema collection for this XML instance is located.The name of the database where the schema collection for this XML instance is located. and are also null. ]]> The owning relational schema where the schema collection for this XML instance is located.The owning relational schema for this XML instance. and are also null. ]]> Gets the name of the schema collection for this XML instance.The name of the schema collection for this XML instance. and are also null. ]]> Enforces encryption of a parameter when using Always Encrypted. If SQL Server informs the driver that the parameter does not need to be encrypted, the query using the parameter will fail. This property provides additional protection against security attacks that involve a compromised SQL Server providing incorrect encryption metadata to the client, which may lead to data disclosure. if the parameter has a force column encryption; otherwise, .To be added. Gets or sets the of the parameter.One of the values. The default is . and are linked. Therefore, setting the changes the to a supporting . For a list of the supported data types, see the appropriate member. For more information, see [DataAdapter Parameters](/sql/connect/ado-net/dataadapter-parameters). ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlParameter_IsNullable Example#1](~/../sqlclient/doc/samples/SqlParameter_IsNullable.cs#1)] ]]> Resets the type associated with this . and properties of the . ]]> Gets or sets the name of the .The name of the . The default is an empty string. is specified in the form @paramname. You must set before executing a that relies on parameters. ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlParameter_ParameterName Example#1](~/../sqlclient/doc/samples/SqlParameter_ParameterName.cs#1)] ]]> Gets or sets the locale identifier that determines conventions and language for a particular region.The locale identifier associated with the parameter. property. ```csharp static void CreateSqlParameterLocaleId(){ SqlParameter parameter = new SqlParameter("pName", SqlDbType.VarChar); parameter.LocaleId = 1033; // English - United States } ``` ]]> Gets or sets the maximum number of digits used to represent the property.The maximum number of digits used to represent the property. The default value is 0. This indicates that the data provider sets the precision for . property is used by parameters that have a of `Decimal`. You do not need to specify values for the and properties for input parameters, as they can be inferred from the parameter value. `Precision` and `Scale` are required for output parameters and for scenarios where you need to specify complete metadata for a parameter without indicating a value, such as specifying a null value with a specific precision and scale. > [!NOTE] > Use of this property to coerce data passed to the database is not supported. To round, truncate, or otherwise coerce data before passing it to the database, use the class that is part of the `System` namespace prior to assigning a value to the parameter's `Value` property. > [!NOTE] > Microsoft .NET Framework data providers that are included with the .NET Framework version 1.0 do not verify the or of parameter values. This can cause truncated data being inserted at the data source. If you are using .NET Framework version 1.0, validate the and of values before setting the parameter value. When you use .NET Framework version 1.1 or a later version, an exception is thrown if a parameter value is set with an invalid . values that exceed the parameter scale are still truncated. ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlParameter_Precision Example#1](~/../sqlclient/doc/samples/SqlParameter_Precision.cs#1)] ]]> Gets or sets the number of decimal places to which is resolved.The number of decimal places to which is resolved. The default is 0. property is used by parameters that have a of `Decimal`. > [!WARNING] > Data may be truncated if the property is not explicitly specified and the data on the server does not fit in scale 0 (the default). You do not need to specify values for the and properties for input parameters, as they can be inferred from the parameter value. `Precision` and `Scale` are required for output parameters and for scenarios where you need to specify complete metadata for a parameter without indicating a value, such as specifying a null value with a specific precision and scale. > [!NOTE] > Use of this property to coerce data passed to the database is not supported. To round, truncate, or otherwise coerce data before passing it to the database, use the class that is part of the `System` namespace prior to assigning a value to the parameter's `Value` property. > [!NOTE] > .NET Framework data providers that are included with the .NET Framework version 1.0 do not verify the or of parameter values. This can cause truncated data to be inserted at the data source. If you are using .NET Framework version 1.0, validate the and of values before setting the parameter value. values that exceed the parameter scale are still truncated. ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlParameter#4](~/../sqlclient/doc/samples/SqlParameter.cs#4)] ]]> Gets or sets the of the parameter.One of the values. The default is . and are linked. Therefore, setting the changes the to a supporting . For a list of the supported data types, see the appropriate member. For more information, see [DataAdapter Parameters](/sql/connect/ado-net/dataadapter-parameters). For information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). ]]> Resets the type associated with this . and properties of the . ]]> Gets or sets the value of the parameter as an SQL type.An that is the value of the parameter, using SQL types. The default value is null. that is sent to the server. For output and return value parameters, the value is set on completion of the and after the is closed. This property can be set to null or . Use to send a NULL value as the value of the parameter. Use null or do not set to use the default value for the parameter. If the application specifies the database type, the bound value is converted to that type when the provider sends the data to the server. The provider tries to convert any type of value if it supports the interface. Conversion errors may result if the specified type is not compatible with the value. Both the and properties can be inferred by setting the . The property is overwritten by `SqlDataAdapter.UpdateCommand`. Use the property to return parameter values as common language runtime (CLR) types. For information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). ]]> Gets or sets a that represents a user-defined type as a parameter.A that represents the fully qualified name of a user-defined type in the database. , see [Retrieving UDT Data](https://msdn.microsoft.com/library/ms131080.aspx). ]]> Gets or sets the type name for a table-valued parameter.The type name of the specified table-valued parameter.To be added. Gets or sets the value of the parameter.An that is the value of the parameter. The default value is null. that is sent to the server. For output and return value parameters, the value is set on completion of the and after the is closed. This property can be set to `null` or . Use to send a NULL value as the value of the parameter. Use `null` or do not set to use the default value for the parameter. An exception is thrown if non-Unicode XML data is passed as a string. If the application specifies the database type, the bound value is converted to that type when the provider sends the data to the server. The provider tries to convert any type of value if it supports the interface. Conversion errors may result if the specified type is not compatible with the value. Both the and properties can be inferred by setting the Value. The property is overwritten by `SqlDataAdapter.UpdateCommand`. For information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlParameter#8](~/../sqlclient/doc/samples/SqlParameter.cs#8)] ]]> Gets or sets a value that indicates whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter.One of the values. The default is . is output, and execution of the associated does not return a value, the contains a null value. `Output`, `InputOut`, and `ReturnValue` parameters returned by calling cannot be accessed until you close the . ## Examples The following example creates a and sets some of its properties. [Commands and Parameters](/sql/connect/ado-net/commands-parameters) [DataAdapter Parameters](/sql/connect/ado-net/dataadapter-parameters) [SQL Server and ADO.NET](/sql/connect/ado-net/sql/) ]]> The property was not set to one of the valid values. Gets or sets a value that indicates whether the parameter accepts null values. is not used to validate the parameter's value and will not prevent sending or receiving a null value when executing a command. if null values are accepted; otherwise, . The default is . class. ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlParameter#2](~/../sqlclient/doc/samples/SqlParameter.cs#2)] ]]> Gets or sets the offset to the property.The offset to the . The default is 0. and sets some of its properties. [!code-csharp[SqlParameter#3](~/../sqlclient/doc/samples/SqlParameter.cs#3)] ]]> Gets or sets the maximum size, in bytes, of the data within the column.The maximum size, in bytes, of the data within the column. The default value is inferred from the parameter value. . For character types, the size specified with is in characters. The property is used for binary and string types. For parameters of type `SqlType.String`, `Size` means length in Unicode characters. For parameters of type `SqlType.Xml`, `Size` is ignored. For nonstring data types and ANSI string data, the property refers to the number of bytes. For Unicode string data, refers to the number of characters. The count for strings does not include the terminating character. For variable-length data types, describes the maximum amount of data to transmit to the server. For example, for a Unicode string value, could be used to limit the amount of data sent to the server to the first one hundred characters. If not explicitly set, the size is inferred from the actual size of the specified parameter value. If the fractional part of the parameter value is greater than the size, then the value will be truncated to match the size. For fixed length data types, the value of is ignored. It can be retrieved for informational purposes, and returns the maximum amount of bytes the provider uses when transmitting the value of the parameter to the server. For information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlParameter#5](~/../sqlclient/doc/samples/SqlParameter.cs#5)] ]]> Gets or sets the name of the source column mapped to the and used for loading or returning the The name of the source column mapped to the . The default is an empty string. is set to anything other than an empty string, the value of the parameter is retrieved from the column with the name. If is set to `Input`, the value is taken from the . If is set to `Output`, the value is taken from the data source. A of `InputOutput` is a combination of both. For more information about how to use the property, see [DataAdapter Parameters](/sql/connect/ado-net/dataadapter-parameters) and [Updating Data Sources with DataAdapters](/sql/connect/ado-net/update-data-sources-with-dataadapters). ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlParameter#6](~/../sqlclient/doc/samples/SqlParameter.cs#6)] ]]> Sets or gets a value which indicates whether the source column is nullable. This allows to correctly generate Update statements for nullable columns. if the source column is nullable; if it is not. is used by the to correctly generate update commands when dealing with nullable columns. Generally, use of is limited to developers inheriting from . uses this property to determine whether the source column is nullable, and sets this property to `true` if it is nullable, and `false` if it is not. When is generating its Update statement, it examines the for each parameter. If the property is `true`, generates a WHERE clauses like the following (in this query expression, "FieldName" represents the name of the field): ``` ((@IsNull_FieldName = 1 AND FieldName IS NULL) OR (FieldName = @Original_FieldName)) ``` If for the field is false, generates the following WHERE clause: ``` FieldName = @OriginalFieldName ``` In addition, @IsNull_FieldName contains 1 if the source field contains null, and 0 if it does not. This mechanism allows for a performance optimization in SQL Server, and provides for common code that works across multiple providers. ]]> Gets a string that contains the .A string that contains the .To be added. Gets or sets the to use when you load One of the values. The default is . used by the `DataRow.Item` property, or one of the `DataRow.GetChildRows` methods of the object. ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlParameter#7](~/../sqlclient/doc/samples/SqlParameter.cs#7)] ]]> For a description of this member, see .A new that is a copy of this instance. instance is cast to an interface. ]]> Checks the parameter name for the @ prefix and appends it if it is missing, then apends the parameter name Compares the two input names for equality discounting the @ prefix on either or both arguments Get SMI Metadata to write out type_info stream. Represents a collection of parameters associated with a and their respective mappings to columns in a . This class cannot be inherited. through the collection. The parameters are used to select data within the data source and populate the . This code assumes that a and a have already been created with the appropriate schema, commands, and connection. [!code-csharp[SqlParameterCollection_Add6 Example#1](~/../sqlclient/doc/samples/SqlParameterCollection_Add6.cs#1)] ]]> The zero-based index of the parameter to retrieve.Gets the at the specified index.The at the specified index. objects to supply an input parameter to a stored procedure that returns results in an output parameter. The code iterates through the items in the and displays some parameter properties in the console window. This example assumes a valid connection string to the **AdventureWorks** sample database on an instance of SQL Server. [!code-csharp[SqlParameterCollection_Count Example#1](~/../sqlclient/doc/samples/SqlParameterCollection_Count.cs#1)] ]]> The specified index does not exist. The name of the parameter to retrieve.Gets the with the specified name.The with the specified name. . If the `parameterName` is not valid, an will be thrown. ]]> The specified is not valid. The to add to the collection.Adds the specified object to the .A new object. The specified in the parameter is already added to this or another .The parameter passed was not a .The parameter is null. The name of the parameter.The value to be added. Use instead of null, to indicate a null value.Adds a value to the end of the .A object. replaces the `SqlParameterCollection.Add` method that takes a and an . The overload of `Add` that takes a string and an object was deprecated because of possible ambiguity with the `SqlParameterCollection.Add` overload that takes a and a enumeration value where passing an integer with the string could be interpreted as being either the parameter value or the corresponding value. Use whenever you want to add a parameter by specifying its name and value. For `Xml` enumeration values, you can use a string, an XML value, an derived type instance, or a object. ## Examples The following example demonstrates how to use the `AddWithValue` method. [!code-csharp[SqlParameterCollection_AddWithValue#1](~/../sqlclient/doc/samples/SqlParameterCollection_AddWithValue.cs#1)] ]]> The name of the parameter.One of the values.Adds a to the given the parameter name and the data type.A new object. The name of the parameter.The of the to add to the collection.The size as an .Adds a to the , given the specified parameter name, and size.A new object. The name of the parameter.One of the values.The column length.The name of the source column () if this is used in a call to .Adds a to the with the parameter name, the data type, and the column length.A new object. The values to add.Adds an array of values to the end of the .To be added. The value.Determines whether the specified parameter name is in this . if the contains the value; otherwise, .To be added. The value.Determines whether the specified is in this . if the contains the value; otherwise, .To be added. The that is the destination of the elements copied from the current .A 32-bit integer that represents the index in the at which copying starts.Copies all the elements of the current to the specified starting at the specified destination index.To be added. The to find.Gets the location of the specified within the collection.The zero-based location of the specified that is a within the collection. Returns -1 when the object does not exist in the .To be added. The zero-based index at which value should be inserted.A object to be inserted in the .Inserts a object into the at the specified index.To be added. A object to remove from the collection.Removes the specified from the collection. object in a collection. If the parameter exists, the example removes it. This example assumes that a collection has already been created by a . [!code-csharp[SqlParameterCollection_Remove Example#1](~/../sqlclient/doc/samples/SqlParameterCollection_Remove.cs#1)] ]]> The parameter is not a .The parameter does not exist in the collection. Returns an Integer that contains the number of elements in the . Read-only.The number of elements in the as an Integer.To be added. Gets a value that indicates whether the has a fixed size. if the has a fixed size; otherwise, .To be added. Gets a value that indicates whether the is read-only. if the is read-only; otherwise, .To be added. Gets a value that indicates whether the is synchronized. if the is synchronized; otherwise, .To be added. Gets an object that can be used to synchronize access to the .An object that can be used to synchronize access to the .To be added. An .Adds the specified object to the .The index of the new object.To be added. The values to add.Adds an array of values to the end of the .To be added. Removes all the objects from the .To be added. The value.Determines whether the specified is in this . if the contains the value; otherwise, .To be added. The one-dimensional that is the destination of the elements copied from the current .A 32-bit integer that represents the index in the at which copying starts.Copies all the elements of the current to the specified one-dimensional starting at the specified destination index.To be added. Returns an enumerator that iterates through the .An for the .To be added. The case-sensitive name of the to find.Gets the location of the specified with the specified name.The zero-based location of the specified with the specified case-sensitive name. Returns -1 when the object does not exist in the .To be added. The to find.Gets the location of the specified within the collection.The zero-based location of the specified that is a within the collection. Returns -1 when the object does not exist in the .To be added. The zero-based index at which value should be inserted.An to be inserted in the .Inserts an into the at the specified index.To be added. The object to remove from the collection.Removes the specified from the collection.To be added. The zero-based index of the object to remove.Removes the from the at the specified index.To be added. The name of the to remove.Removes the from the at the specified parameter name.To be added. To be added.To be added.To be added.To be added. To be added.To be added.To be added.To be added. To be added.To be added.To be added.To be added. To be added.To be added.To be added.To be added. Implements a cache of query parameter metadata that is used to avoid the extra roundtrip to the server for every execution of the same query. Retrieves the query metadata for a specific query from the cache. Add the metadata for a specific query to the cache. Remove the metadata for a specific query from the cache. Increments the counter for the cache hits in the query metadata cache. Increments the counter for the cache misses in the query metadata cache. Provides data for the event. event is raised when an to a row is completed. When using , there are two events that occur for each data row updated. The order of execution is as follows: 1. The values in the are moved to the parameter values. 2. The event is raised. 3. The command executes. 4. If the command is set to `FirstReturnedRecord`, and the first returned result is placed in the . 5. If there are output parameters, they are placed in the . 6. The event is raised. 7. is called. ## Examples The following example shows how to use both the and events. The event returns this output: Event Arguments: (command=Microsoft.Data.SqlClient.SqlCommand commandType=2 status=0) The event returns this output: Event Arguments: (command=Microsoft.Data.SqlClient.SqlCommand commandType=2 recordsAffected=1 row=System.Data.DataRow[37] status=0) [!code-csharp[SqlDataAdapter_RowUpdated Example#1](~/../sqlclient/doc/samples/SqlDataAdapter_RowUpdated.cs#1)] ]]> The sent through an .The executed when is called.One of the values that specifies the type of query executed.The sent through an .Initializes a new instance of the class.To be added. Gets or sets the executed when is called.The executed when is called.To be added. The source of the event.The that contains the event data.Represents the method that will handle the event of a . delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see [Handling and Raising Events](/dotnet/standard/events/). ]]> Provides data for the event. event is raised before an to a row. When you are using , there are two events that occur for each data row updated. The order of execution is as follows: 1. The values in the are moved to the parameter values. 2. The event is raised. 3. The command executes. 4. If the command is set to `FirstReturnedRecord`, and the first returned result is placed in the . 5. If there are output parameters, they are placed in the . 6. The event is raised. 7. is called. ## Examples The following example shows how to use both the and events. The event returns this output: event args: (command=Microsoft.Data.SqlClient.SQLCommand commandType=2 status=0) The event returns this output: event args: (command=Microsoft.Data.SqlClient.SQLCommand commandType=2 recordsAffected=1 row=System.Data.DataRow[37] status=0) [!code-csharp[SqlRowUpdatingEventArgs Example#1](~/../sqlclient/doc/samples/SqlRowUpdatingEventArgs.cs#1)] ]]> The to .The to execute during .One of the values that specifies the type of query executed.The sent through an .Initializes a new instance of the class.To be added. Gets or sets the to execute when performing the .The to execute when performing the .To be added. To be added.To be added.To be added. The source of the event.The that contains the event data.Represents the method that will handle the event of a . to influence the processing of the updates. For example, the handler may opt to skip the update of the current row or skip the update of all remaining rows. Note that the rows are updated in the order that they were received from the data source. When you create a delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see [Handling and Raising Events](/dotnet/standard/events/). ]]> Computes a keyed hash of a given text and returns. It fills the buffer "hash" with computed hash value. Plain text bytes whose hash has to be computed. key used for the HMAC Output buffer where the computed hash value is stored. If its less that 64 bytes, the hash is truncated HMAC value Computes SHA256 hash of a given input input byte array which needs to be hashed Returns SHA256 hash in a string form Generates cryptographically random bytes No of cryptographically random bytes to be generated A byte array containing cryptographically generated random bytes Compares two byte arrays and returns true if all bytes are equal input buffer another buffer to be compared against returns true if both the arrays have the same byte values else returns false Gets hex representation of byte array. input byte array Returns the caller's function name in the format of [ClassName].[FunctionName] Return the algorithm name mapped to an Id. Retrieves a string with comma separated list of registered algorithm Ids (enclosed in quotes). Encrypts the plaintext. Gets a string with first/last 10 bytes in the buff (useful for exception handling). Decrypts the ciphertext. Decrypts the symmetric key and saves it in metadata. In addition, initializes the SqlClientEncryptionAlgorithm for rapid decryption. Decrypts the symmetric key and saves it in metadata. Calculates the length of the Base64 string used to represent a byte[] with the specified length. Verifies Column Master Key Signature. Forces the stream to act as if it was closed (i.e. CanRead=false and Read() throws) This does not actually close the stream, read off the rest of the data or dispose this Checks the parameters passed into a Read() method are valid Implements a cache of Symmetric Keys (once they are decrypted).Useful for rapidly decrypting multiple data values. Retrieves Symmetric Key (in plaintext) given the encryption material. Defines exceptions that are specific to Configurable Retry Logic. Class of variables for the Tds connection. Deprecated in TDS7.4 (2010) Deprecated in TDS7.4 (2010) Specifies a value for Attestation Protocol. If the attestation protocol is not specified. Use this as default value.0 Attestation portocol for Azure Attestation Service1 Attestation protocol for no attestation. Only compatible with Virtualization-based security (VBS) enclaves. An Enclave Attestation Url is not required when using this protocol.2 Attestation protocol for Host Guardian Service3 Specifies a value for IP address preference during a TCP connection. Connects using IPv4 address(es) first. If the connection fails, try IPv6 address(es), if provided. This is the default value.0 Connect using IPv6 address(es) first. If the connection fails, try IPv4 address(es), if available.1 Connects with IP addresses in the order the underlying platform or operating system provides them.2 Note that these settings cannot be used to bypass encryption and gain access to plaintext data. For details, see Always Encrypted (Database Engine).To be added. Specifies the connection does not use Always Encrypted. Should be used if no queries sent over the connection access encrypted columns. Enables Always Encrypted functionality for the connection. Query parameters that correspond to encrypted columns will be transparently encrypted and query results from encrypted columns will be transparently decrypted. Specifies a value for Overrides. No overrides.0 Disable transient fault handling during the initial SqlConnection Open attempt.1 Note that these settings cannot be used to bypass encryption and gain access to plaintext data. For details, see Always Encrypted (Database Engine). Specifies that the command should default to the Always Encrypted setting in the connection string. Enables Always Encrypted for the query. Specifies that only the results of the command should be processed by the Always Encrypted routine in the driver. Use this value when the command has no parameters that require encryption. Specifies the connection does not use Always Encrypted. Should be used if no queries sent over the connection access encrypted columns. Describes the different SQL authentication methods that can be used by a client connecting to Azure SQL Database. For details, see Connecting to SQL Database By Using Azure Active Directory Authentication. To be added. The authentication method is not specified.0 The authentication method is Sql Password.1 The authentication method uses Active Directory Password. Use Active Directory Password to connect to a SQL Database using an Azure AD principal name and password.2 The authentication method uses Active Directory Integrated. Use Active Directory Integrated to connect to a SQL Database using integrated Windows authentication.3 The authentication method uses Active Directory Interactive. Use Active Directory Interactive to connect to a SQL Database with an interactive authentication flow.4 The authentication method uses Active Directory Service Principal. Use Active Directory Service Principal to connect to a SQL Database using the client ID and secret of a service principal identity.5 The authentication method uses Active Directory Device Code Flow. Use Active Directory Device Code Flow to connect to a SQL Database from devices and operating systems that do not provide a Web browser, using another device to perform interactive authentication.6 The authentication method uses Active Directory Managed Identity. Use System Assigned or User Assigned Managed Identity to connect to SQL Database from Azure client environments that have enabled support for Managed Identity. For User Assigned Managed Identity, 'User Id' or 'UID' is required to be set to the "client ID" of the user identity.7 Alias for "Active Directory Managed Identity" authentication method. Use System Assigned or User Assigned Managed Identity to connect to SQL Database from Azure client environments that have enabled support for Managed Identity. For User Assigned Managed Identity, 'User Id' or 'UID' is required to be set to the "client ID" of the user identity.8 The authentication method uses Active Directory Default. Use this mode to connect to a SQL Database using multiple non-interactive authentication methods tried sequentially to acquire an access token. This method does not fallback to the "Active Directory Interactive" authentication method.9 The authentication method uses Active Directory Workload Identity. Use a federated User Assigned Managed Identity to connect to SQL Database from Azure client environments that have enabled support for Workload Identity. The 'User Id' or 'UID' is required to be set to the "client ID" of the user identity.10 internal read buffer - initialize on login number of bytes used in internal read buffer number of bytes read into internal read buffer number of bytes left in packet Used to synchronize access to _writePacketCache and _pendingWritePackets If this method returns true, the value is guaranteed to be null. This is not true vice versa: if the bitmap value is false (if this method returns false), the value can be either null or non-null - no guarantee in this case. To determine whether it is null or not, read it from the TDS (per NBCROW design spec, for IMAGE/TEXT/NTEXT columns server might send bitmap = 0, when the actual value is null). attempts to change the timout state from the expected state to the target state and if it succeeds will setup the the stateobject into the timeout expired state the state that is the expected current state, state will change only if this is correct the state that will be changed to if the expected state is correct any close action to be taken by an async task to avoid deadlock. boolean value indicating whether the call changed the timeout state Checks to see if the underlying connection is still alive (used by connection pool resiliency) NOTE: This is not safe to do on a connection that is currently in use NOTE: This will mark the connection as broken if it is found to be dead If true then an exception will be thrown if the connection is found to be dead, otherwise no exception will be thrown True if the connection is still alive, otherwise false This is a no-op in netcore version. Only needed for merging with netfx codebase. Checks to see if the underlying connection is still valid (used by idle connection resiliency - for active connections) NOTE: This is not safe to do on a connection that is currently in use NOTE: This will mark the connection as broken if it is found to be dead True if the connection is still alive, otherwise false True if there is at least one error or warning (not counting the pre-attention errors\warnings) Adds an error to the error collection Gets the number of errors currently in the error collection Adds an warning to the warning collection Gets the number of warnings currently in the warning collection Gets the number of errors currently in the pre-attention warning collection Gets the full list of errors and warnings (including the pre-attention ones), then wipes all error and warning lists If true, the connection should be broken An array containing all of the errors and warnings Stores away current errors and warnings so that an attention can be processed Restores errors and warnings that were stored in order to process an attention Checks if an error is stored in _error and, if so, throws an error Debug Only: Ensures that the TdsParserStateObject has no lingering state and can safely be re-used Virtualization Based Security Intel SGX based security Encapsulates the information SqlClient sends to SQL Server to initiate the process of attesting and creating a secure session with the enclave, SQL Server uses for computations on columns protected using Always Encrypted.To be added. The enclave attestation protocol.The input of the enclave attestation protocol.A Diffie-Hellman algorithm that encapsulates a client-side key pair.Initializes a new instance of the class.To be added. is . Gets the enclave attestation protocol identifier.The enclave attestation protocol identifier.To be added. Gets a Diffie-Hellman algorithm that encapsulates a key pair that SqlClient uses to establish a secure session with the enclave.The Diffie-Hellman algorithm.To be added. Gets the information used to initiate the process of attesting the enclave. The format and the content of this information is specific to the attestation protocol.The information required by SQL Server to execute attestation protocol identified by EnclaveAttestationProtocols.To be added. When overridden in a derived class, looks up and evicts an enclave session from the enclave session cache, if the provider implements session caching. The set of parameters required for enclave session. The session to be invalidated. Verifies that a chain of trust can be built from the health report provided by SQL Server and the attestation service's root signing certificate(s). If the method returns false, the value of chainStatus doesn't matter. The chain could not be validated. A that indicates if the certificate was able to be verified. This class extends SslStream to customize stream behavior for Managed SNI implementation. This class extends NetworkStream to customize stream behavior for Managed SNI implementation. SSL encapsulated over TDS transport. During SSL handshake, SSL packets are transported in TDS packet type 0x12. Once SSL handshake has completed, SSL packets are sent transparently. Constructor Underlying stream Constructor Underlying stream Connection Id of parent stream handle Finish SSL handshake. Stop encapsulating in TDS. Set stream length. Length Flush stream Get/set stream position Seek in stream Offset Origin Position Check if stream can be read from Check if stream can be written to Check if stream can be seeked Get stream length This class implements a FIFO Queue with SemaphoreSlim for ordered execution of parallel tasks. Currently used in Managed SNI (SNISslStream) to override SslStream's WriteAsync implementation. SNI error SNI connection handle Dispose class Set async callbacks Receive callback Send callback Set buffer size Buffer size Send a packet synchronously SNI packet SNI error code Send a packet asynchronously SNI packet SNI error code Receive a packet synchronously SNI packet Timeout in Milliseconds SNI error code Receive a packet asynchronously SNI packet SNI error code Enable SSL Disable SSL Check connection status SNI error code Last handle status Connection ID Gets a value that indicates the security protocol used to authenticate this connection. Global SNI settings and status Last SNI error SNI library status Encryption options setting Verify client encryption possibility SNI MARS connection. Multiple MARS streams will be overlaid on this connection. Connection ID Constructor Lower handle Start receiving Send a packet synchronously SNI packet SNI error code Send a packet asynchronously SNI packet SNI error code Receive a packet asynchronously SNI packet SNI error code Check SNI handle connection SNI error status Process a receive error Process a send completion SNI packet SNI error code Process a receive completion SNI packet SNI error code Enable SSL Disable SSL MARS handle Connection ID Handle status Dispose object Constructor MARS connection MARS session ID Callback object true if connection is asynchronous Send control packet SMUX header flags Generate a packet with SMUX header SNI packet The packet with the SMUx header set. Send a packet synchronously SNI packet SNI error code Send packet asynchronously SNI packet SNI error code Send pending packets SNI error code Send a packet asynchronously SNI packet SNI error code Receive a packet asynchronously SNI packet SNI error code Handle receive error Handle send completion SNI packet SNI error code Handle SMUX acknowledgment Send highwater mark Handle receive completion SNI packet SMUX header Send ACK if we've hit highwater threshold Receive a packet synchronously SNI packet Timeout in Milliseconds SNI error code Check SNI handle connection SNI error status Set async callbacks Receive callback Send callback Set buffer size Buffer size Named Pipe connection handle Validate server certificate Sender object X.509 certificate X.509 chain Policy errors true if valid Set buffer size Buffer size SNI Packet Length of data left to process Indicates that the packet should be sent out of band bypassing the normal send-recieve lock Length of data Packet validity Set async receive callback Completion callback Invoke the receive callback SNI error Allocate space for data Length of packet header Length of byte array to be allocated Read packet data into a buffer without removing it from the packet Buffer Number of bytes read from the packet into the buffer Take data from another packet Packet Data to take Amount of data taken Append data Data Size Read data from the packet into the buffer at dataOffset for zize and then remove that data from the packet Buffer Data offset to write data at Number of bytes to read from the packet into the buffer Release packet Read data from a stream synchronously Stream to read from Read data from a stream asynchronously Stream to read from Write data to a stream synchronously Stream to write to Write data to a stream asynchronously Stream to write to SNI Asynchronous Callback SNI provider identifier Managed SNI proxy implementation. Contains many SNI entry points used by SqlClient. Generate SSPI context SSPI client context status Receive buffer Send buffer Service Principal Name buffer SNI error code Create a SNI connection handle Full server name from connection string Timer expiration Instance name SPN pre-defined SPN Flush packet cache Asynchronous connection Attempt parallel connects IP address preference Used for DNS Cache Used for DNS Cache Support TDS8.0 Used for the HostName in certificate Used for the path to the Server Certificate SNI handle Creates an SNITCPHandle object Data source Timer expiration Should MultiSubnetFailover be used IP address preference Key for DNS Cache Used for DNS Cache Support TDS8.0 Host name in certificate Used for the path to the Server Certificate SNITCPHandle Creates an SNINpHandle object Data source Timer expiration Should MultiSubnetFailover be used. Only returns an error for named pipes. SNINpHandle Get last SNI error on this thread Gets the Local db Named pipe data source if the input is a localDB server. The data source Set true when an error occurred while getting LocalDB up Provides the HostName of the server to connect to for TCP protocol. This information is also used for finding the SPN of SqlServer Provides the port on which the TCP connection should be made if one was specified in Data Source The port resolved by SSRP when InstanceName is specified Provides the inferred Instance Name from Server Data Source Provides the pipe name in case of Named Pipes Provides the HostName to connect to in case of Named pipes Data Source TCP connection handle Dispose object Connection ID Connection status Constructor Server name TCP port number Connection timer expiration Parallel executions IP address preference Key for DNS Cache Used for DNS Cache Support TDS8.0 Host Name in Certificate Used for the path to the Server Certificate Returns array of IP addresses for the given server name, sorted according to the given preference. Thrown when ipPreference is not supported Enable SSL Disable SSL Validate server certificate callback Sender object X.509 certificate provided from the server X.509 chain Policy errors True if certificate is valid Set buffer size Buffer size Send a packet synchronously SNI packet SNI error code Receive a packet synchronously SNI packet Timeout in Milliseconds SNI error code Set async callbacks Receive callback Send callback Send a packet asynchronously SNI packet SNI error code Receive a packet asynchronously SNI packet SNI error code Check SNI handle connection SNI error status SNI Asynchronous callback SNI packet SNI error code SNI provider identifiers SMUX packet header SMUX packet flags We only validate Server name in Certificate to match with "targetServerName". Certificate validation and chain trust validations are done by SSLStream class [System.Net.Security.SecureChannel.VerifyRemoteCertificate method] This method is called as a result of callback for SSL Stream Certificate validation. Server that client is expecting to connect to X.509 certificate Policy errors True if certificate is valid We validate the provided certificate provided by the client with the one from the server to see if it matches. Certificate validation and chain trust validations are done by SSLStream class [System.Net.Security.SecureChannel.VerifyRemoteCertificate method] This method is called as a result of callback for SSL Stream Certificate validation. X.509 certificate provided by the client X.509 certificate provided by the server Policy errors True if certificate is valid Sets last error encountered for SNI SNI provider Native error code SNI error code Error message Sets last error encountered for SNI SNI provider SNI error code SNI Exception Native SNI error code Sets last error encountered for SNI SNI error Finds instance port number for given instance name. SQL Sever Browser hostname instance name to find port number Connection timer expiration query all resolved IP addresses in parallel IP address preference port number for given instance name Creates instance port lookup request (CLNT_UCAST_INST) for given instance name. instance name to lookup port Byte array of instance port lookup request (CLNT_UCAST_INST) Finds DAC port for given instance name. SQL Sever Browser hostname instance name to lookup DAC port Connection timer expiration query all resolved IP addresses in parallel IP address preference DAC port for given instance name Creates DAC port lookup request (CLNT_UCAST_DAC) for given instance name. instance name to lookup DAC port Byte array of DAC port lookup request (CLNT_UCAST_DAC) Sends request to server, and receives response from server by UDP. UDP server hostname UDP server port request packet Connection timer expiration query all resolved IP addresses in parallel IP address preference response packet from UDP server Sends request to server, and receives response from server by UDP. IP Addresses UDP server port request packet query all resolved IP addresses in parallel response packet from UDP server Sends request to server, and recieves response from server (SQLBrowser) on port 1434 by UDP Request (https://docs.microsoft.com/en-us/openspecs/windows_protocols/mc-sqlr/a3035afa-c268-4699-b8fd-4f351e5c8e9e) Response (https://docs.microsoft.com/en-us/openspecs/windows_protocols/mc-sqlr/2e1560c9-5097-4023-9f5e-72b9ff1ec3b1) string constaning list of SVR_RESP(just RESP_DATA) Copies data in SNIPacket to given byte array parameter SNIPacket object containing data packets Destination byte array where data packets are copied to Length of data packets SNI error status Loads the User Instance dll. Retrieves the part of the sqlUserInstance.dll from the registry In case the dll path is not found, the error is set here. Authentication provider manager. Constructor. The configuration section definition for reading app.config. User-defined auth providers. User-defined initializer. Application Client Id The configuration section definition for reading app.config. Sets default supported Active Directory Authentication providers by the driver on the SqlAuthenticationProviderManager instance. Constructor. Get an authentication provider by method. Authentication method. Authentication provider or null if not found. Set an authentication provider by method. Authentication method. Authentication provider. True if succeeded, false otherwise, e.g., the existing provider disallows overriding. The base class that defines the interface for enclave providers for Always Encrypted. An enclave is a protected region of memory inside SQL Server, used for computations on encrypted columns. An enclave provider encapsulates the client-side implementation details of the enclave attestation protocol as well as the logic for creating and caching enclave sessions. The base class that defines the interface for enclave providers for Always Encrypted. Performs enclave attestation, generates a symmetric key for the session, creates a an enclave session and stores the session information in the cache. The information the provider uses to attest the enclave and generate a symmetric key for the session. The format of this information is specific to the enclave attestation protocol. A Diffie-Hellman algorithm object encapsulating a client-side key pair. The set of parameters required for enclave session. The set of extra data needed for attesting the enclave. The length of the extra data needed for attesting the enclave. The requested enclave session or null if the provider does not implement session caching. A counter that the enclave provider is expected to increment each time SqlClient retrieves the session from the cache. The purpose of this field is to prevent replay attacks. The set of parameters required for enclave session. to indicate that a set of extra data needs to be generated for attestation; otherwise, .Indicates if this is a retry from a failed call.When this method returns, the requested enclave session or if the provider doesn't implement session caching. This parameter is treated as uninitialized.A counter that the enclave provider is expected to increment each time SqlClient retrieves the session from the cache. The purpose of this field is to prevent replay attacks.A set of extra data needed for attesting the enclave.The length of the extra data needed for attesting the enclave.When overridden in a derived class, looks up an existing enclave session information in the enclave session cache. If the enclave provider doesn't implement enclave session caching, this method is expected to return in the parameter. To be added. The endpoint of an attestation service for attesting the enclave.A set of extra data needed for attesting the enclave.The length of the extra data needed for attesting the enclave.Gets the information that SqlClient subsequently uses to initiate the process of attesting the enclave and to establish a secure session with the enclave.The information SqlClient subsequently uses to initiate the process of attesting the enclave and to establish a secure session with the enclave.To be added. The set of parameters required for enclave session.The session to be invalidated.When overridden in a derived class, looks up and evicts an enclave session from the enclave session cache, if the provider implements session caching.To be added. This is a no-op in netcore version. Only needed for merging with netfx codebase. Verify client encryption possibility. Get or set if column encryption is supported by the server. TCE version supported by the server Server supports retrying when the enclave CEKs sent by the client do not match what is needed for the query to run. Type of enclave being used by the server Get if data classification is enabled by the server. Get or set data classification version. A value of 0 means that sensitivity classification is not enabled. Checks if the given token is a valid TDS token Token to check True if the token is a valid TDS token, otherwise false Parses the TDS message to read single CIPHER_INFO entry. Parses the TDS message to read a single CIPHER_INFO table. Determines if a column value should be transparently decrypted (based on SqlCommand and Connection String settings). true if the value should be transparently decrypted, false otherwise This method skips bytes of a single column value from the media. It supports NBCROW and handles all types of values, including PLP and long Deserializes the unencrypted bytes into a value based on the target type info. Send the access token to the server. Type encapsulating a Federated Authentication access token. Will check the parameter name for the required @ prefix and then write the correct prefixed form and correct character length to the output buffer Loads the column encryptions keys into cache. This will read the master key info, decrypt the CEK and keep it ready for encryption. Writes a single entry of CEK Table into TDS Stream (for bulk copy). Writes a CEK Table (as part of COLMETADATA token) for bulk copy. Writes the UserType and TYPE_INFO values for CryptoMetadata (for bulk copy). Writes the crypto metadata (as part of COLMETADATA token) for encrypted columns. Determines if a column value should be encrypted when using BulkCopy (based on connectionstring setting). Encrypts a column value (for SqlBulkCopy) Write parameter encryption metadata and returns a task if necessary. Write parameter encryption metadata. override this method to cleanup instance data before ClearCore is called which will blank the base data override this method to do work after the instance has been totally blanked, intended for cache return etc Represents a single encrypted value for a CEK. It contains the encrypted CEK, the store type, name,the key path and encryption algorithm. Encapsulates one entry in the CipherInfo table sent as part of Colmetadata. The same CEK is encrypted multiple times with different master keys (for master key rotation scenario) We need to keep all these around until we can resolve the CEK using the correct master key. List of Column Encryption Key Information. Key Ordinal. Database ID Cek ID Cek Version Cek MD Version Return the ordinal. Return the DatabaseID. Return the CEK ID. Return the CEK Version. Return the CEK MD Version. Return the list of Column Encryption Key Values. Add an entry to the list of ColumnEncryptionKeyValues. Constructor. Represents a table with various CEKs used in a resultset. Each entry corresponds to one (unique) CEK. The CEK may have been encrypted using multiple master keys (giving us multiple CEK values). All these values form one single entry in this table. Represents Encryption related information of the cipher data. Cipher Info Entry. Encryption Algorithm Id. Encryption Algorithm Name. Encryption Type. Normalization Rule Version. Encryption Algorithm Handle. Sql Encryption Key Info. Ordinal (into the Cek Table). Return the Encryption Info Entry. Return the cipher's encryption algorithm id. Return the cipher's encryption algorithm name (could be null). Return EncryptionType (Deterministic, Randomized, etc.) Return normalization rule version. Return the cipher encryption algorithm handle. Return Encryption Key Info. Return Ordinal into Cek Table. Constructor. Do we have an handle to the cipher encryption algorithm already ? Is the algorithm handle for the cipher encryption initialized ? Returns the normalization rule version byte. Class encapsulating additional information when sending encrypted input parameters. Metadata of the parameter to write the TYPE_INFO of the unencrypted column data type. Column encryption related metadata. Serialized format for a subset of members. Does not include _smiParameterMetadata's serialization. Return the SMI Parameter Metadata. Return the serialized format for some members. This is pre-calculated and cached since members are immutable. Does not include _smiParameterMetadata's serialization. Constructor. Serializes some data members to wire format. Serializes an int into the provided buffer and offset. AppContext switch manager To support the AppContext's set switch through the config file for .NET Core; .Net Framework supports it internally through the configuration file by 'AppContextSwitchOverrides' element under 'runtime' section The configuration section definition for reading a configuration file. Called from constructors in derived classes to initialize the class.To be added. Called from constructors in derived classes to initialize the class.To be added. Lets you efficiently bulk load a SQL Server table with data from another source. class lets you write managed code solutions that provide similar functionality. There are other ways to load data into a SQL Server table (INSERT statements, for example), but offers a significant performance advantage over them. The class can be used to write data only to SQL Server tables. However, the data source is not limited to SQL Server; any data source can be used, as long as the data can be loaded to a instance or read with a instance. will fail when bulk loading a column of type into a SQL Server column whose type is one of the date/time types added in SQL Server 2008. ## Examples The following console application demonstrates how to load data using the class. In this example, a is used to copy data from the **Production.Product** table in the SQL Server **AdventureWorks** database to a similar table in the same database. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[BulkCopy.Single#1](~/../sqlclient/doc/samples/SqlBulkCopy_Single.cs#1)] ]]> Occurs every time that the number of rows specified by the property have been processed. and are independent. Receipt of a event does not imply that any rows have been sent to the server or committed. You cannot call SqlBulkCopy.Close () or SqlConnection.Close () from this event. Doing this will cause an being thrown, and the object state will not change. If the user wants to cancel the operation from the event, the property of the can be used. (See [Transaction and Bulk Copy Operations](/sql/connect/ado-net/sql/transaction-bulk-copy-operations) for examples that use the property.) No action, such as transaction activity, is supported in the connection during the execution of the bulk copy operation, and it is recommended that you not use the same connection used during the event. However, you can open a different connection. ## Examples The following console application demonstrates how to bulk load data using a connection that is already open. The property is set so that the event handler is called after every 50 rows copied to the table. In this example, the connection is first used to read data from a SQL Server table to a instance. Note that the source data does not have to be located on SQL Server; you can use any data source that can be read to an or loaded to a . > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.NotifyAfter#1](~/../sqlclient/doc/samples/SqlBulkCopy_NotifyAfter.cs#1)] ]]> The already open instance that will be used to perform the bulk copy operation. If your connection string does not use , you can use to pass the user ID and password more securely than by specifying the user ID and password as text in the connection string. Initializes a new instance of the class using the specified open instance of . instance is initialized, the connection remains open after the instance is closed. If the `connection` argument is null, an is thrown. ## Examples The following console application demonstrates how to bulk load data using a connection that is already open. In this example, a is used to copy data from the **Production.Product** table in the SQL Server **AdventureWorks** database to a similar table in the same database. This example is for demonstration purposes only. You would not use `SqlBulkCopy` to move data from one table to another in the same database in a production application. Note that the source data does not have to be located on SQL Server; you can use any data source that can be read to an or loaded to a . > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[BulkCopy.Single#1](~/../sqlclient/doc/samples/SqlBulkCopy_Single.cs#1)] ]]> The already open instance that will be used to perform the bulk copy. If your connection string does not use , you can use to pass the user ID and password more securely than by specifying the user ID and password as text in the connection string. A combination of values from the enumeration that determines which data source rows are copied to the destination table. An existing instance under which the bulk copy will occur. Initializes a new instance of the class using the supplied existing open instance of . The instance behaves according to options supplied in the parameter. If a non-null is supplied, the copy operations will be performed within that transaction. Performing Bulk Copy Operations Overview of the SqlClient driver The string defining the connection that will be opened for use by the instance. If your connection string does not use , you can use or and to pass the user ID and password more securely than by specifying the user ID and password as text in the connection string. Initializes and opens a new instance of based on the supplied . The constructor uses the to initialize a new instance of the class. is thrown. If `connectionString` is an empty string, an is thrown. ## Examples The following console application demonstrates how to bulk load data by using a connection specified as a string. The connection is automatically closed when the instance is closed. In this example, the source data is first read from a SQL Server table to a instance. The source data does not have to be located on SQL Server; you can use any data source that can be read to an or loaded to a . > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ConnectionString#1](~/../sqlclient/doc/samples/SqlBulkCopy_ConnectionString.cs#1)] ]]> If `connectionString` is an empty string, an is thrown. The string defining the connection that will be opened for use by the instance. If your connection string does not use , you can use or and to pass the user ID and password more securely than by specifying the user ID and password as text in the connection string. A combination of values from the enumeration that determines which data source rows are copied to the destination table. Initializes and opens a new instance of based on the supplied . The constructor uses that to initialize a new instance of the class. The instance behaves according to options supplied in the parameter. topic. ## Examples The following console application demonstrates how to perform a bulk load by using a connection specified as a string. An option is set to use the value in the identity column of the source table when you load the destination table. In this example, the source data is first read from a SQL Server table to a instance. The source table and destination table each include an Identity column. By default, a new value for the **Identity** column is generated in the destination table for each row added. In this example, an option is set when the connection is opened that forces the bulk load process to use the **Identity** values from the source table instead. To see how the option changes the way the bulk load works, run the sample with the **dbo.BulkCopyDemoMatchingColumns** table empty. All rows load from the source. Then run the sample again without emptying the table. An exception is thrown and the code writes a message to the console notifying you that rows weren't added because of primary key constraint violations. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.KeepIdentity#1](~/../sqlclient/doc/samples/SqlBulkCopy_KeepIdentity.cs#1)] ]]> Number of rows in each batch. At the end of each batch, the rows in the batch are sent to the server. The integer value of the property, or zero if no value has been set. rows have been processed or there are no more rows to send to the destination data source. Zero (the default) indicates that each operation is a single batch. If the instance has been declared without the option in effect, rows are sent to the server rows at a time, but no transaction-related action is taken. If is in effect, each batch of rows is inserted as a separate transaction. The property can be set at any time. If a bulk copy is already in progress, the current batch is sized according to the previous batch size. Subsequent batches use the new size. If the is initially zero and changed while a operation is already in progress, that operation loads the data as a single batch. Any subsequent operations on the same instance use the new . ## Examples The following console application demonstrates how to bulk load data in batches of 50 rows. For an example illustrating how works with a transaction, see [Transaction and Bulk Copy Operations](/sql/connect/ado-net/sql/transaction-bulk-copy-operations). > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.BatchSize#1](~/../sqlclient/doc/samples/SqlBulkCopy_BatchSize.cs#1)] ]]> Number of seconds for the operation to complete before it times out. The integer value of the property. The default is 30 seconds. A value of 0 indicates no limit; the bulk copy will wait indefinitely. instance. The source data does not have to be located on SQL Server; you can use any data source that can be read to an or loaded to a . > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.Timeout#1](~/../sqlclient/doc/samples/SqlBulkCopy_Timeout.cs#1)] ]]> Enables or disables a object to stream data from an object if a object can stream data from an object; otherwise, false. The default is . is `true`, reads from an object using , optimizing memory usage by using the streaming capabilities. Streaming is only applicable to max data types (i.e. VARBINARY(MAX), VARCHAR(MAX), NVARCHAR(MAX), and XML). When is set to false, the class loads all the data returned by the object into memory before sending it to the server. > [!NOTE] > The main advantage of enabling streaming is reducing memory usage during bulk copy of max data types. ]]> Returns a collection of items. Column mappings define the relationships between columns in the data source and columns in the destination. A collection of column mappings. By default, it is an empty collection. collection is unnecessary. However, if the column counts differ, or the ordinal positions are not consistent, you must use to make sure that data is copied into the correct columns. During the execution of a bulk copy operation, this collection can be accessed, but it cannot be changed. Any attempt to change it will throw an . ]]> Returns a collection of items. Column order hints describe the sort order of columns in the clustered index of the destination table. A collection of column order hints. By default, it is an empty collection. Name of the destination table on the server. The string value of the property, or null if none as been supplied. has not been set when is called, an is thrown. If is modified while a operation is running, the change does not affect the current operation. The new value is used the next time a method is called. is a three-part name (`..`). You can qualify the table name with its database and owning schema if you choose. However, if the table name uses an underscore ("_") or any other special characters, you must escape the name using surrounding brackets as in (`[..]`). You can bulk-copy data to a temporary table by using a value such as `tempdb..#table` or `tempdb..#table` for the property. ## Examples The following console application demonstrates how to bulk load data using a connection that is already open. The destination table is a table in the **AdventureWorks** database. In this example, the connection is first used to read data from a SQL Server table to a instance. The source data does not have to be located on SQL Server; you can use any data source that can be read to an or loaded to a . > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.Single#1](~/../sqlclient/doc/samples/SqlBulkCopy_Single.cs#1)] ]]> Defines the number of rows to be processed before generating a notification event. The integer value of the property, or zero if the property has not been set. property can be set at any time, even while a bulk copy operation is underway. Changes made during a bulk copy operation take effect after the next notification. The new setting applies to all subsequent operations on the same instance. If is set to a number less than zero, an is thrown. ## Examples The following console application demonstrates how to bulk load data using a connection that is already open. The property is set so that the event handler is called after every 50 rows copied to the table. In this example, the connection is first used to read data from a SQL Server table to a instance. Then a second connection is opened to bulk copy the data. Note that the source data does not have to be located on SQL Server; you can use any data source that can be read to an or loaded to a . > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.NotifyAfter#1](~/../sqlclient/doc/samples/SqlBulkCopy_NotifyAfter.cs#1)] ]]> The number of rows processed in the ongoing bulk copy operation. The integer value of the property. event and does not imply that this number of rows has been sent to the server or committed. This value can be accessed during or after the execution of a bulk copy operation. This value will wrap around and become negative if the number of rows exceeds int.MaxValue. Consider using the property. ]]> The number of rows processed in the ongoing bulk copy operation. The long value of the property. event and does not imply that this number of rows has been sent to the server or committed. This value can be accessed during or after the execution of a bulk copy operation. ]]> Closes the instance. on the object, no other operation will succeed. Calls to the method will throw an . Calling the method from the event causes an to be thrown. Note that open instances are closed implicitly at the end of a `using` block. ## Examples The following example uses the same instance to add sales orders and their associated details to two destination tables. Because the **AdventureWorks** sales order tables are large, the sample reads only orders placed by a certain account number and bulk copies those orders and details to the destination tables. The method is used only after both bulk copy operations are complete. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.OrdersDetails#1](~/../sqlclient/doc/samples/SqlBulkCopy_OrdersDetails.cs#1)] ]]> A whose rows will be copied to the destination table. Copies all rows from the supplied array to a destination table specified by the property of the object. To be added. A did not specify a valid destination column name. A whose rows will be copied to the destination table. Copies all rows in the supplied to a destination table specified by the property of the object. or a similar call, so the next available row is the first row. To process multiple results, call on the data reader and call again. Note that using modifies the state of the reader. The method will call until it returns false, the operation is aborted, or an error occurs. This means that the data reader will be in a different state, probably at the end of the result set, when the operation is complete. While the bulk copy operation is in progress, the associated destination is busy serving it, and no other operations can be performed on the connection. The collection maps from the data reader columns to the destination database table. ## Examples The following console application demonstrates how to bulk load data from a . The destination table is a table in the **AdventureWorks** database. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.ConnectionString#1](~/../sqlclient/doc/samples/SqlBulkCopy_ConnectionString.cs#1)] ]]> A did not specify a valid destination column name. A whose rows will be copied to the destination table. Copies all rows in the supplied to a destination table specified by the property of the object. are copied to the destination table except those that have been deleted. While the bulk copy operation is in progress, the associated destination is busy serving it, and no other operations can be performed on the connection. The collection maps from the columns to the destination database table. ## Examples The following Console application demonstrates how to bulk load data from a . The destination table is a table in the **AdventureWorks** database. In this example, a is created at run time and is the source of the `SqlBulkCopy` operation. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.DataTable#1](~/../sqlclient/doc/samples/SqlBulkCopy_DataTable.cs#1)] ]]> A did not specify a valid destination column name. Performing Bulk Copy Operations Overview of the SqlClient driver A whose rows will be copied to the destination table. A value from the enumeration. Only rows matching the row state are copied to the destination. Copies only rows that match the supplied row state in the supplied to a destination table specified by the property of the object. that are in the states indicated in the `rowState` argument and have not been deleted are copied to the destination table. > [!NOTE] > If is specified, any , , and rows will also be copied to the server. No exception will be raised. While the bulk copy operation is in progress, the associated destination is busy serving it, and no other operations can be performed on the connection. The collection maps from the columns to the destination database table. ## Examples The following Console application demonstrates how to bulk load only the rows in a that match a specified state. In this case, only unchanged rows are added. The destination table is a table in the **AdventureWorks** database. In this example, a is created at run time and three rows are added to it. Before the method is executed, one of the rows is edited. The method is called with a `DataRowState.Unchanged` `rowState` argument, so only the two unchanged rows are bulk copied to the destination. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.DataRowState#1](~/../sqlclient/doc/samples/SqlBulkCopy_DataRowState.cs#1)] ]]> A did not specify a valid destination column name. An array of objects that will be copied to the destination table.Copies all rows from the supplied array to a destination table specified by the property of the object. is busy serving it, and no other operations can be performed on the connection. The collection maps from the columns to the destination database table. ## Examples The following console application demonstrates how to bulk load data from a array. The destination table is a table in the **AdventureWorks** database. In this example, a is created at run time. A single row is selected from the to copy to the destination table. > [!IMPORTANT] > This sample will not run unless you have created the work tables as described in [Bulk Copy Example Setup](/sql/connect/ado-net/sql/bulk-copy-example-setup). This code is provided to demonstrate the syntax for using **SqlBulkCopy** only. If the source and destination tables are in the same SQL Server instance, it is easier and faster to use a Transact-SQL `INSERT … SELECT` statement to copy the data. [!code-csharp[SqlBulkCopy.RowArray#1](~/../sqlclient/doc/samples/SqlBulkCopy_RowArray.cs#1)] ]]> A did not specify a valid destination column name. An array of objects that will be copied to the destination table. The asynchronous version of , which copies all rows from the supplied array to a destination table specified by the property of the object. A task representing the asynchronous operation. Calling multiple times for the same instance before task completion. Calling and for the same instance before task completion. The connection drops or is closed during execution. Returned in the task object, the object was closed during the method execution. Returned in the task object, there was a connection pool timeout. Returned in the task object, the object is closed before method execution. A did not specify a valid destination column name. Returned in the task object, any error returned by SQL Server that occurred while opening the connection. An array of objects that will be copied to the destination table. The cancellation instruction. A value in this parameter makes this method equivalent to . The asynchronous version of , which copies all rows from the supplied array to a destination table specified by the property of the object. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. A task representing the asynchronous operation. Calling multiple times for the same instance before task completion. Calling and for the same instance before task completion. The connection drops or is closed during execution. Returned in the task object, the object was closed during the method execution. Returned in the task object, there was a connection pool timeout. Returned in the task object, the object is closed before method execution. A did not specify a valid destination column name. Returned in the task object, any error returned by SQL Server that occurred while opening the connection. A whose rows will be copied to the destination table. The asynchronous version of , which copies all rows in the supplied to a destination table specified by the property of the object. A task representing the asynchronous operation. Calling multiple times for the same instance before task completion. Calling and for the same instance before task completion. The connection drops or is closed during execution. Returned in the task object, the object was closed during the method execution. Returned in the task object, there was a connection pool timeout. Returned in the task object, the object is closed before method execution. The was closed before the completed returned. The 's associated connection was closed before the completed returned. A did not specify a valid destination column name. Returned in the task object, any error returned by SQL Server that occurred while opening the connection. A whose rows will be copied to the destination table. The cancellation instruction. A value in this parameter makes this method equivalent to . The asynchronous version of , which copies all rows from the supplied array to a destination table specified by the property of the object. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. A task representing the asynchronous operation. To be added. A whose rows will be copied to the destination table. The asynchronous version of , which copies all rows in the supplied to a destination table specified by the property of the object. A task representing the asynchronous operation. Calling multiple times for the same instance before task completion. Calling and for the same instance before task completion. The connection drops or is closed during execution. Returned in the task object, the object was closed during the method execution. Returned in the task object, there was a connection pool timeout. Returned in the task object, the object is closed before method execution. The was closed before the completed returned. The 's associated connection was closed before the completed returned. A did not specify a valid destination column name. Returned in the task object, any error returned by SQL Server that occurred while opening the connection. A whose rows will be copied to the destination table. The cancellation instruction. A value in this parameter makes this method equivalent to . The asynchronous version of , which copies all rows in the supplied to a destination table specified by the property of the object. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. A task representing the asynchronous operation. Calling multiple times for the same instance before task completion. Calling and for the same instance before task completion. The connection drops or is closed during execution. Returned in the task object, the object was closed during the method execution. Returned in the task object, there was a connection pool timeout. Returned in the task object, the object is closed before method execution. The was closed before the completed returned. The 's associated connection was closed before the completed returned. A did not specify a valid destination column name. Returned in the task object, any error returned by SQL Server that occurred while opening the connection. A whose rows will be copied to the destination table. The asynchronous version of , which copies all rows in the supplied to a destination table specified by the property of the object. A task representing the asynchronous operation. Calling multiple times for the same instance before task completion. Calling and for the same instance before task completion. The connection drops or is closed during execution. Returned in the task object, the object was closed during the method execution. Returned in the task object, there was a connection pool timeout. Returned in the task object, the object is closed before method execution. A did not specify a valid destination column name. Returned in the task object, any error returned by SQL Server that occurred while opening the connection. A whose rows will be copied to the destination table. The cancellation instruction. A value in this parameter makes this method equivalent to . The asynchronous version of , which copies all rows in the supplied to a destination table specified by the property of the object. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. A task representing the asynchronous operation. Calling multiple times for the same instance before task completion. Calling and for the same instance before task completion. The connection drops or is closed during execution. Returned in the task object, the object was closed during the method execution. Returned in the task object, there was a connection pool timeout. Returned in the task object, the object is closed before method execution. A did not specify a valid destination column name. Returned in the task object, any error returned by SQL Server that occurred while opening the connection. A whose rows will be copied to the destination table. A value from the enumeration. Only rows matching the row state are copied to the destination. The asynchronous version of , which copies only rows that match the supplied row state in the supplied to a destination table specified by the property of the object. A task representing the asynchronous operation. Calling multiple times for the same instance before task completion. Calling and for the same instance before task completion. The connection drops or is closed during execution. Returned in the task object, the object was closed during the method execution. Returned in the task object, there was a connection pool timeout. Returned in the task object, the object is closed before method execution. A did not specify a valid destination column name. Returned in the task object, any error returned by SQL Server that occurred while opening the connection. A whose rows will be copied to the destination table. A value from the enumeration. Only rows matching the row state are copied to the destination. The cancellation instruction. A value in this parameter makes this method equivalent to . The asynchronous version of , which copies only rows that match the supplied row state in the supplied to a destination table specified by the property of the object. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. A task representing the asynchronous operation. Calling multiple times for the same instance before task completion. Calling and for the same instance before task completion. The connection drops or is closed during execution. Returned in the task object, the object was closed during the method execution. Returned in the task object, there was a connection pool timeout. Returned in the task object, the object is closed before method execution. A did not specify a valid destination column name. Returned in the task object, any error returned by SQL Server that occurred while opening the connection. Extension methods on the DiagnosticListener class to log SqlCommand data Represents a set of methods for creating instances of the provider's implementation of the data source classes. To be added. Gets an instance of the . This can be used to retrieve strongly typed data objects. property to retrieve a **SqlClientFactory** instance, and then return a strongly typed instance: ```csharp SqlClientFactory newFactory = SqlClientFactory.Instance; DbCommand cmd = newFactory.CreateCommand(); ``` ]]> Returns a strongly typed instance. A new strongly typed instance of . instance: ```csharp SqlClientFactory newFactory = SqlClientFactory.Instance; DbCommand cmd = newFactory.CreateCommand(); ``` ]]> Returns a strongly typed instance. A new strongly typed instance of . instance: ```csharp SqlClientFactory newFactory = SqlClientFactory.Instance; DbCommandBuilder cmd = newFactory.CreateCommandBuilder(); ``` ]]> Returns a strongly typed instance. A new strongly typed instance of . instance: ```csharp SqlClientFactory newFactory = SqlClientFactory.Instance; DbConnection cmd = newFactory.CreateConnection(); ``` ]]> Returns a strongly typed instance. A new strongly typed instance of . instance: ```csharp SqlClientFactory newFactory = SqlClientFactory.Instance; DbConnectionStringBuilder cmd = newFactory.CreateConnectionStringBuilder(); ``` ]]> Returns a strongly typed instance. A new strongly typed instance of . instance: ```csharp SqlClientFactory newFactory = SqlClientFactory.Instance; DbDataAdapter cmd = newFactory.CreateDataAdapter(); ``` ]]> Returns a strongly typed instance. A new strongly typed instance of . instance: ```csharp SqlClientFactory newFactory = SqlClientFactory.Instance; DbParameter cmd = newFactory.CreateParameter(); ``` ]]> Represents a Transact-SQL statement or stored procedure to execute against a SQL Server database. This class cannot be inherited. is created, the read/write properties are set to their initial values. For a list of these values, see the constructor. features the following methods for executing commands at a SQL Server database: |Item|Description| |----------|-----------------| ||Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this , generally executing commands such as INSERT, DELETE, UPDATE, and SET statements. Each call to must be paired with a call to which finishes the operation, typically on a separate thread.| ||Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this and retrieves one or more results sets from the server. Each call to must be paired with a call to which finishes the operation, typically on a separate thread.| ||Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this . Each call to `BeginExecuteXmlReader` must be paired with a call to `EndExecuteXmlReader`, which finishes the operation, typically on a separate thread, and returns an object.| ||Executes commands that return rows. For increased performance, invokes commands using the Transact-SQL `sp_executesql` system stored procedure. Therefore, might not have the effect that you want if used to execute commands such as Transact-SQL SET statements.| ||Executes commands such as Transact-SQL INSERT, DELETE, UPDATE, and SET statements.| ||Retrieves a single value (for example, an aggregate value) from a database.| ||Sends the to the and builds an object.| You can reset the property and reuse the object. However, you must close the before you can execute a new or previous command. If a is generated by the method executing a , the remains open when the severity level is 19 or less. When the severity level is 20 or greater, the server ordinarily closes the . However, the user can reopen the connection and continue. > [!NOTE] > Nameless, also called ordinal, parameters are not supported by the .NET Framework Data Provider for SQL Server. ## Examples The following example creates a , a , and a . The example reads through the data, writing it to the console. Finally, the example closes the and then the as it exits the `Using` code blocks. [!code-csharp[SqlCommand Example#1](~/../sqlclient/doc/samples/SqlCommand.cs#1)] The following sample shows how to create and execute different types of SqlCommand objects. First you must create the sample database, by executing the following script: [!code-sql[Setup Database](~/../sqlclient/doc/samples/SqlCommand_Setup.sql#1)] Next, compile and execute the following: [!code-csharp[SqlCommand Example#2](~/../sqlclient/doc/samples/SqlCommand_Intro.cs#1)] ]]> Indicates if the column encryption setting was set at-least once in the batch rpc mode, when using AddBatchCommand. Column Encryption Override. Defaults to SqlConnectionSetting, in which case it will be Enabled if SqlConnectionOptions.IsColumnEncryptionSettingEnabled = true, Disabled if false. This may also be used to set other behavior which overrides connection level setting. Return if column encryption setting is enabled. The order in the below if is important since _activeConnection.Parser can throw if the underlying tds connection is closed and we don't want to change the behavior for folks not trying to use transparent parameter encryption i.e. who don't use (SqlCommandColumnEncryptionSetting.Enabled or _activeConnection.IsColumnEncryptionSettingEnabled) here. Per-command custom providers. It can be provided by the user and can be set more than once. This variable is used to keep track of which RPC batch's results are being read when reading the results of describe parameter encryption RPC requests in BatchRPCMode. A flag to indicate if we have in-progress describe parameter encryption RPC requests. Reset to false when completed. A flag to indicate if EndExecute was already initiated by the Begin call. A flag to indicate whether we postponed caching the query metadata for this command. Initializes a new instance of the class. . |Properties|Initial value| |----------------|-------------------| ||empty string ("")| ||30| ||`CommandType.Text`| ||Null| You can change the value for any of these properties through a separate call to the property. ## Examples The following example creates a and sets the `CommandTimeout` property. [!code-csharp[Classic WebData IDbCommand_CommandTimeout.cs](~/../sqlclient/doc/samples/IDbCommand_CommandTimeout.cs)] ]]> The text of the query. Initializes a new instance of the class with the text of the query. is created, the following read/write properties are set to initial values. |Properties|Initial value| |----------------|-------------------| ||`cmdText`| ||30| ||`CommandType.Text`| ||null| You can change the value for any of these properties through a separate call to the property. ## Examples The following example creates a , passing in the connection string and command text. [!code-csharp[SqlCommand_SqlCommand1](~/../sqlclient/doc/samples/SqlCommand_SqlCommand1.cs#1)] ]]> The text of the query. A that represents the connection to an instance of SQL Server. Initializes a new instance of the class with the text of the query and a . . |Properties|Initial value| |----------------|-------------------| ||`cmdText`| ||30| ||`CommandType.Text`| ||A new that is the value for the `connection` parameter.| You can change the value for any of these parameters by setting the related property. ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlCommand_SqlCommand2.cs](~/../sqlclient/doc/samples/SqlCommand_SqlCommand2.cs#1)] ]]> The text of the query. A that represents the connection to an instance of SQL Server. The in which the executes. Initializes a new instance of the class with the text of the query, a , and the . . |Properties|Initial value| |----------------|-------------------| ||`cmdText`| ||30| ||`CommandType.Text`| ||A new that is the value for the `connection` parameter.| You can change the value for any of these parameters by setting the related property. ]]> The text of the query. A that represents the connection to an instance of SQL Server. The in which the executes. The encryption setting. For more information, see [Always Encrypted](/sql/relational-databases/security/encryption/always-encrypted-database-engine). Initializes a new instance of the class with specified command text, connection, transaction, and encryption setting. To be added. Gets or sets the used by this instance of the . The connection to a data source. The default value is . . If the property is not null and the transaction has already been committed or rolled back, is set to null. ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlCommand_Connection](~/../sqlclient/doc/samples/SqlCommand_Connection.cs)] ]]> The property was changed while the command was enlisted in a transaction. [ To be added. To be added. To be added. Gets or sets a value that specifies the object bound to this command. When set to null (default), the default non-retriable provider will be used. type. 2. Create a by using one of the following static methods of the class: - - - - 3. Assign the object to the `RetryLogicProvider` property. > [!NOTE] > Detecting retriable exceptions is a vital part of the retry pattern. Before applying retry logic, it is important to investigate exceptions and choose a retry provider that best fits your scenario. First, log your exceptions and find transient faults. > [!NOTE] > The command **timeout** restarts for each execution of a command within the retry logic and after applying the retry time delay. There is no timing overlap between these two actions. > [!NOTE] > The default retry logic provider is not enabled unless it is configured in an application configuration file. For more information, see [Configurable retry logic configuration file](/sql/connect/ado-net/configurable-retry-logic-config-file-sqlclient). > [!CAUTION] > A command with isn't compatible with the built-in retry logic. The underlying connection is immediately closed after the first execution attempt and is no longer available for subsequent retries. ## Example The following sample creates a database and establishes an active connection to it. While the database has an active connection, it tries to drop it with a new and a that uses a . You should kill the active connection through the database to unblock the second command before exceeding the number of retries. The blocking connection simulates a situation like a command still running in the database and unlikely to finish. [!code-csharp[SqlConfigurableRetryLogic_SqlCommand#1](~/../sqlclient/doc/samples/SqlConfigurableRetryLogic_SqlCommand.cs#1)] ### How to use with synchronous commands [!code-csharp[SqlConfigurableRetryLogic_SqlCommand#2](~/../sqlclient/doc/samples/SqlConfigurableRetryLogic_SqlCommand.cs#2)] ### How to use with asynchoronous commands [!code-csharp[SqlConfigurableRetryLogic_SqlCommand#3](~/../sqlclient/doc/samples/SqlConfigurableRetryLogic_SqlCommand.cs#3)] ### How to use with legacy asynchronous commands Besides assigning the provider to the command and executing the command, it's possible to run it directly using the following methods: - - - [!code-csharp[SqlConfigurableRetryLogic_SqlCommand#4](~/../sqlclient/doc/samples/SqlConfigurableRetryLogic_SqlCommand.cs#4)] > [!NOTE] > The Asynchronous Programming Model (APM) is a legacy pattern that uses a pair of methods starting with `Begin` and `End`, and an interface called `IAsyncResult`. It's not recommended to use this pattern in new applications. These methods are for backwards compatibility. ]]> Gets or sets a value that specifies the object bound to this command. When set to null (default), no notification should be requested. Gets or sets the within which the executes. The . The default value is . 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 object that is not connected to the same as the object, an exception is thrown the next time that you attempt to execute a statement. ]]> To be added. To be added. To be added. Gets or sets the Transact-SQL statement, table name or stored procedure to execute at the data source. The Transact-SQL statement or stored procedure to execute. The default is an empty string. property is set to `StoredProcedure`, the 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. 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: ```sql SELECT * FROM dbo.Customers WHERE CustomerID = @CustomerID ``` For more information, see [Configuring parameters](/sql/connect/ado-net/configure-parameters). ## Examples The following example creates a and sets some of its properties. [!code-csharp[SqlCommand_CommandText](~/../sqlclient/doc/samples/SqlCommand_CommandText.cs)] ]]> Gets the column encryption setting for this command. The column encryption setting for this command. Gets or sets the wait time (in seconds) before terminating the attempt to execute a command and generating an error. The default is 30 seconds. The time in seconds to wait for the command to execute. The default is 30 seconds. [!NOTE] > The property will be ignored during old-style asynchronous method calls such as . It will be honored by the newer async methods such as . > [!NOTE] > 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. For example, with a 30 second time out, if requires two network packets, then it has 30 seconds to read both network packets. If you call again, it will have another 30 seconds to read any data that it requires. [!code-csharp[SqlCommand CommandTimeout](~/../sqlclient/doc/samples/SqlCommand_CommandTimeout.cs)] ]]> The value set is less than 0. Resets the property to its default value. is 30 seconds. ]]> Gets or sets a value indicating how the property is to be interpreted. One of the values. The default is . property to `StoredProcedure`, you should set the property to the name of the stored procedure. The command executes this stored procedure when you call one of the Execute methods. 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 of . In this case, named parameters must be used. For example: SELECT * FROM Customers WHERE CustomerID = @CustomerID For more information, see [Configuring parameters](/sql/connect/ado-net/configure-parameters). ## Examples The following example creates a and sets some of its properties. [!code-csharp[IDbCommand_CommandTimeout](~/../sqlclient/doc/samples/IDbCommand_CommandTimeout.cs)] ]]> Gets or sets a value indicating whether the command object should be visible in a Windows Form Designer control. A value indicating whether the command object should be visible in a control. The default is . To be added. Gets or sets a value indicating whether the command object should optimize parameter performance by disabling Output and InputOutput directions when submitting the command to the SQL Server. A value indicating whether the command object should optimize parameter performance by disabling Output and InputOuput parameter directions when submitting the command to the SQL Server. The default is . [!NOTE] If the option is enabled and a parameter with Direction Output or InputOutput is present in the Parameters collection an InvalidOperationException will be thrown when the command is executed. ]]> Gets the . The parameters of the Transact-SQL statement or stored procedure. The default is an empty collection. [!NOTE] > If the parameters in the collection do not match the requirements of the query to be executed, an error may result. For more information, see [Configuring parameters](/sql/connect/ado-net/configure-parameters). ## Examples The following example demonstrates how to create a and add parameters to the . [!code-csharp[SqlParameterCollection.AddWithValue#1](~/../sqlclient/doc/samples/SqlParameterCollection_AddWithValue.cs#1)] ]]> Gets the collection of objects. The parameters of the SQL statement or stored procedure. To be added. Gets or sets how command results are applied to the when used by the **Update** method of the . One of the values. value is **Both** unless the command is automatically generated (as in the case of the ), in which case the default is **None**. For more information about using the **UpdatedRowSource** property, see [DataAdapter Parameters](/sql/connect/ado-net/dataadapter-parameters). ]]> Occurs when the execution of a Transact-SQL statement completes. To be added. Creates a prepared version of the command on an instance of SQL Server. is set to `StoredProcedure`, the call to should succeed, although it may cause a no-op. Before you call , 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 property to the maximum size needed. returns an error if these conditions are not met. > [!NOTE] > If the database context is changed by executing the Transact-SQL `USE ` statement, or by calling the method, then must be called a second time. If you call an `Execute` method after calling , any parameter value that is larger than the value specified by the property is automatically truncated to the original specified size of the parameter, and no truncation errors are returned. 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 . Prior to Visual Studio 2010, threw an exception. Beginning in Visual Studio 2010, this method does not throw an exception. ## Examples The following example demonstrates the use of the method. [!code-csharp[SqlCommand.Prepare#1](~/../sqlclient/doc/samples/SqlCommand_Prepare.cs#1)] ]]> Tries to cancel the execution of a . , then call (implicitly or explicitly) before calling , and then call , the cancel command will not be sent to SQL Server and the result set can continue to stream after you call . To avoid this, make sure that you call before closing the reader or connection. ## Examples The following example demonstrates the use of the method. [!code-csharp[SqlCommand_Cancel](~/../sqlclient/doc/samples/SqlCommand_Cancel.cs)] ]]> Creates a new instance of a object. A object. method is a strongly-typed version of . ]]> Creates a new instance of a object. A object. To be added. To be added. To be added. To be added. To be added. To be added. To be added. 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. The first column of the first row in the result set, or a null reference ( in Visual Basic) if the result set is empty. Returns a maximum of 2033 characters. method to retrieve a single value (for example, an aggregate value) from a database. This requires less code than using the method, and then performing the operations that you need to generate the single value using the data returned by a . A typical query can be formatted as in the following C# example: ```csharp cmd.CommandText = "SELECT COUNT(*) FROM dbo.region"; Int32 count = (Int32) cmd.ExecuteScalar(); ``` ## Examples The following example creates a and then executes it using . The example is passed a string representing a new value to be inserted into a table, and a string to use to connect to the data source. The function returns the new **Identity** column value if a new row was inserted, 0 on failure. [!code-csharp[SqlCommand.ExecuteScalar#1](~/../sqlclient/doc/samples/SqlCommand_ExecuteScalar.cs#1)] ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . An exception occurred while executing the command against a locked row. This exception is not generated when you are using Microsoft .NET Framework version 1.0. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). Executes a Transact-SQL statement against the connection and returns the number of rows affected. The number of rows affected. 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 by executing UPDATE, INSERT, or DELETE statements. Although the returns no rows, any output parameters or return values mapped to parameters are populated with data. For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1. 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. When SET NOCOUNT ON is set on the connection (before or as part of executing the command, or as part of a trigger initiated by the execution of the command) the rows affected by individual statements stop contributing to the count of rows affected that is returned by this method. If no statements are detected that contribute to the count, the return value is -1. If a rollback occurs, the return value is also -1. ## Examples The following example creates a and then executes it using . The example is passed a string that is a Transact-SQL statement (such as UPDATE, INSERT, or DELETE) and a string to use to connect to the data source. [!code-csharp[SqlCommand_ExecuteNonQuery](~/../sqlclient/doc/samples/SqlCommand_ExecuteNonQuery.cs)] ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . An exception occurred while executing the command against a locked row. This exception is not generated when you are using Microsoft .NET Framework version 1.0. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this . An that can be used to poll or wait for results, or both; this value is also needed when invoking , which returns the number of affected rows. 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 method to finish the operation. The method returns immediately, but until the code executes the corresponding method call, it must not execute any other calls that start a synchronous or asynchronous execution against the same object. Calling the before the command's execution is completed causes the object to block until the execution is finished. 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. Because this overload does not support a callback procedure, developers must either poll to determine whether the command has completed, using the property of the returned by the method; or wait for the completion of one or more commands using the property of the returned . This method ignores the property. ## Examples The following console application creates updates data within the **AdventureWorks** sample database, doing its work asynchronously. In order to emulate a long-running process, this example inserts a WAITFOR statement in the command text. Normally, you would not take efforts to make your commands run slower, but doing this in this case makes it easier to demonstrate the asynchronous behavior. [!code-csharp[SqlCommand_BeginExecuteNonQuery](~/../sqlclient/doc/samples/SqlCommand_BeginExecuteNonQuery.cs)] ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . Any error that occurred while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). - or - is set to true and a parameter with direction Output or InputOutput has been added to the collection. An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An delegate that is invoked when the command's execution has completed. Pass ( in Microsoft Visual Basic) to indicate that no callback is required. A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the property. Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this , given a callback procedure and state information. An that can be used to poll or wait for results, or both; this value is also needed when invoking , which returns the number of affected rows. 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 method to finish the operation. The method returns immediately, but until the code executes the corresponding method call, it must not execute any other calls that start a synchronous or asynchronous execution against the same object. Calling the before the command's execution is completed causes the object to block until the execution is finished. The `callback` parameter lets you specify an delegate that is called when the statement has completed. You can call the method from within this delegate procedure, or from any other location within your application. In addition, you can pass any object in the `asyncStateObject` parameter, and your callback procedure can retrieve this information using the property. 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. 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. 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. This method ignores the property. ## Examples The following Windows application demonstrates the use of the method, executing a Transact-SQL statement that includes a delay of several seconds (emulating a long-running command). This example demonstrates many important techniques. This includes calling a method that interacts with the form from a separate thread. In addition, this example demonstrates how you must block users from executing a command multiple times concurrently, and how you must make sure that the form does not close before the callback procedure is called. To set up this example, create a new Windows application. Put a control and a control on the form (accepting the default name for each control). Add the following code to the form's class, modifying the connection string as needed for your environment. [!code-csharp[DataWorks SqlCommand_BeginExecuteNonQueryForm#1](~/../sqlclient/doc/samples/SqlCommand_BeginExecuteNonQueryForm.cs)] ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . Any error that occurred while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). - or - is set to true and a parameter with direction Output or InputOutput has been added to the collection. The returned by the call to . Finishes asynchronous execution of a Transact-SQL statement. The number of rows affected (the same behavior as ). to execute a Transact-SQL statement, you must call 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 instance returned by the method. If a callback procedure was specified in the call to , this method must be called. ## Examples For examples demonstrating the use of the method, see . ]]> parameter is null ( in Microsoft Visual Basic) was called more than once for a single command execution, or the method was mismatched against its execution method (for example, the code called to complete execution of a call to . The amount of time specified in elapsed and the asynchronous operation specified with is not complete. -or- In some situations, can be set to incorrectly. If this occurs and is called, EndExecuteNonQuery could raise a SqlException error if the amount of time specified in elapsed and the asynchronous operation specified with is not complete. To correct this situation, you should either increase the value of CommandTimeout or reduce the work being done by the asynchronous operation. To be added. To be added. Sends the to the and builds an object. An object. property ordinarily specifies a Transact-SQL statement with a valid FOR XML clause. However, 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. A typical query can be formatted as in the following Microsoft Visual C# example: ```csharp SqlCommand command = new SqlCommand("SELECT * FROM dbo.Customers FOR XML AUTO, XMLDATA", SqlConn); ``` 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 method attaches the to the value on the first row, and discards the rest of the result set. The multiple active result set (MARS) feature allows for multiple actions using the same connection. If you use or 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 or to read FOR XML queries. ## Examples The following example creates a and then executes it using . The example is passed a string that is a Transact-SQL FOR XML SELECT statement, and a string to use to connect to the data source. [!code-csharp[SqlCommand_ExecuteXmlReader#1](~/../sqlclient/doc/samples/SqlCommand_ExecuteXmlReader.cs#1)] ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . An exception occurred while executing the command against a locked row. This exception is not generated when you are using Microsoft .NET Framework version 1.0. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this and returns results as an object. An that can be used to poll or wait for results, or both; this value is also needed when invoking , which returns a single XML value. 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 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 object. Calling the `EndExecuteXmlReader` before the command's execution is completed causes the object to block until the execution is finished. The 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. A typical query can be formatted as in the following C# example: ```csharp SqlCommand command = new SqlCommand("SELECT ContactID, FirstName, LastName FROM dbo.Contact FOR XML AUTO, XMLDATA", SqlConn); ``` 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 to the value on the first row, and discards the rest of the result set. The multiple active result set (MARS) feature lets multiple actions use the same connection. 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. Because this overload does not support a callback procedure, developers need to either poll to determine whether the command has completed, using the property of the returned by the method; or wait for the completion of one or more commands using the property of the returned . If you use or 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 or to read FOR XML queries. This method ignores the property. ## Examples The following console application starts the process of retrieving XML data asynchronously. While waiting for the results, this simple application sits in a loop, investigating the property value. Once the process has completed, the code retrieves the XML and displays its contents. [!code-csharp[SqlCommand_BeginExecuteXmlReader#1]((~/../sqlclient/doc/samples/SqlCommand_BeginExecuteXmlReader.cs)] ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . Any error that occurred while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). - or - is set to true and a parameter with direction Output or InputOutput has been added to the collection. An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An delegate that is invoked when the command's execution has completed. Pass ( in Microsoft Visual Basic) to indicate that no callback is required. A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the property. Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this and returns results as an object, using a callback procedure. An that can be used to poll, wait for results, or both; this value is also needed when the is called, which returns the results of the command as XML. 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 method to finish the operation and retrieve the requested XML data. The method returns immediately, but until the code executes the corresponding method call, it must not execute any other calls that start a synchronous or asynchronous execution against the same object. Calling the before the command's execution is completed causes the object to block until the execution is finished. The 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 method attaches the to the value on the first row, and discards the rest of the result set. A typical query can be formatted as in the following C# example: ```csharp SqlCommand command = new SqlCommand("SELECT ContactID, FirstName, LastName FROM Contact FOR XML AUTO, XMLDATA", SqlConn); ``` 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 method attaches the to the value on the first row, and discards the rest of the result set. The multiple active result set (MARS) feature lets multiple actions use the same connection. The `callback` parameter lets you specify an delegate that is called when the statement has completed. You can call the method from within this delegate procedure, or from any other location within your application. In addition, you can pass any object in the `stateObject` parameter, and your callback procedure can retrieve this information using the property. 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. 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. If you use or 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 or to read FOR XML queries. This method ignores the property. ## Examples The following Windows application demonstrates the use of the method, executing a Transact-SQL statement that includes a delay of a few seconds (emulating a long-running command). This example passes the executing object as the `stateObject` parameter--doing so makes it simple to retrieve the object from within the callback procedure, so that the code can call the method corresponding to the initial call to . This example demonstrates many important techniques. This includes calling a method that interacts with the form from a separate thread. In addition, this example demonstrates how you must block users from executing a command multiple times concurrently, and how you must make sure that the form does not close before the callback procedure is called. To set up this example, create a new Windows application. Put a control, a control, and a control on the form (accepting the default name for each control). Add the following code to the form's class, modifying the connection string as needed for your environment. [!code-csharp[SqlCommand_BeginExecuteXmlReaderAsync](~/../sqlclient/doc/samples/SqlCommand_BeginExecuteXmlReaderAsync.cs)] ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . Any error that occurred while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). - or - is set to true and a parameter with direction Output or InputOutput has been added to the collection. An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The returned by the call to . Finishes asynchronous execution of a Transact-SQL statement, returning the requested data as XML. An object that can be used to fetch the resulting XML data. to execute a Transact-SQL statement, you must call 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 instance returned by the method. If a callback procedure was specified in the call to , this method must be called. ## Examples For examples demonstrating the use of the method, see . ]]> parameter is null ( in Microsoft Visual Basic) was called more than once for a single command execution, or the method was mismatched against its execution method (for example, the code called to complete execution of a call to . Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this and returns results as an object. An that can be used to poll or wait for results, or both; this value is also needed when invoking , which returns a single XML value. 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 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 object. Calling the `EndExecuteXmlReader` before the command's execution is completed causes the object to block until the execution is finished. The 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. A typical query can be formatted as in the following C# example: ```csharp SqlCommand command = new SqlCommand("SELECT ContactID, FirstName, LastName FROM dbo.Contact FOR XML AUTO, XMLDATA", SqlConn); ``` 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 to the value on the first row, and discards the rest of the result set. The multiple active result set (MARS) feature lets multiple actions use the same connection. 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. Because this overload does not support a callback procedure, developers need to either poll to determine whether the command has completed, using the property of the returned by the method; or wait for the completion of one or more commands using the property of the returned . If you use or 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 or to read FOR XML queries. This method ignores the property. ## Examples The following console application starts the process of retrieving XML data asynchronously. While waiting for the results, this simple application sits in a loop, investigating the property value. Once the process has completed, the code retrieves the XML and displays its contents. [!code-csharp[SqlCommand_BeginExecuteXmlReader#1]((~/../sqlclient/doc/samples/SqlCommand_BeginExecuteXmlReader.cs)] ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . Any error that occurred while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). - or - is set to true and a parameter with direction Output or InputOutput has been added to the collection. An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An delegate that is invoked when the command's execution has completed. Pass ( in Microsoft Visual Basic) to indicate that no callback is required. A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the property. Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this and returns results as an object, using a callback procedure. An that can be used to poll, wait for results, or both; this value is also needed when the is called, which returns the results of the command as XML. 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 method to finish the operation and retrieve the requested XML data. The method returns immediately, but until the code executes the corresponding method call, it must not execute any other calls that start a synchronous or asynchronous execution against the same object. Calling the before the command's execution is completed causes the object to block until the execution is finished. The 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 method attaches the to the value on the first row, and discards the rest of the result set. A typical query can be formatted as in the following C# example: ```csharp SqlCommand command = new SqlCommand("SELECT ContactID, FirstName, LastName FROM Contact FOR XML AUTO, XMLDATA", SqlConn); ``` 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 method attaches the to the value on the first row, and discards the rest of the result set. The multiple active result set (MARS) feature lets multiple actions use the same connection. The `callback` parameter lets you specify an delegate that is called when the statement has completed. You can call the method from within this delegate procedure, or from any other location within your application. In addition, you can pass any object in the `stateObject` parameter, and your callback procedure can retrieve this information using the property. 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. 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. If you use or 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 or to read FOR XML queries. This method ignores the property. ## Examples The following Windows application demonstrates the use of the method, executing a Transact-SQL statement that includes a delay of a few seconds (emulating a long-running command). This example passes the executing object as the `stateObject` parameter--doing so makes it simple to retrieve the object from within the callback procedure, so that the code can call the method corresponding to the initial call to . This example demonstrates many important techniques. This includes calling a method that interacts with the form from a separate thread. In addition, this example demonstrates how you must block users from executing a command multiple times concurrently, and how you must make sure that the form does not close before the callback procedure is called. To set up this example, create a new Windows application. Put a control, a control, and a control on the form (accepting the default name for each control). Add the following code to the form's class, modifying the connection string as needed for your environment. [!code-csharp[SqlCommand_BeginExecuteXmlReaderAsync](~/../sqlclient/doc/samples/SqlCommand_BeginExecuteXmlReaderAsync.cs)] ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . Any error that occurred while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). - or - is set to true and a parameter with direction Output or InputOutput has been added to the collection. An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). One of the values, indicating options for statement execution and data retrieval. Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this using one of the values. An that can be used to poll, wait for results, or both; this value is also needed when invoking , which returns a instance that can be used to retrieve the returned rows. 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 method to finish the operation and retrieve the returned by the command. The method returns immediately, but until the code executes the corresponding method call, it must not execute any other calls that start a synchronous or asynchronous execution against the same object. Calling the before the command's execution is completed causes the object to block until the execution is finished. The `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 is closed. 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 may block if more data is required and the underlying network's read operation blocks. Because this overload does not support a callback procedure, developers must either poll to determine whether the command has completed, using the property of the returned by the method; or wait for the completion of one or more commands using the property of the returned . If you use or 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 or to read FOR XML queries. This method ignores the property. ## Examples The following console application starts the process of retrieving a data reader asynchronously. While waiting for the results, this simple application sits in a loop, investigating the property value. Once the process has completed, the code retrieves the and displays its contents. This example also passes the `CommandBehavior.CloseConnection` and `CommandBehavior.SingleRow` values in the behavior parameter, causing the connection to be closed with the returned is closed, and to optimize for a single row result. [!code-csharp[SqlCommand_BeginExecuteReaderAsyncSimple](~/../sqlclient/doc/samples/SqlCommand_BeginExecuteReaderAsyncSimple.cs)] ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . Any error that occurred while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). - or - is set to true and a parameter with direction Output or InputOutput has been added to the collection. An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An delegate that is invoked when the command's execution has completed. Pass ( in Microsoft Visual Basic) to indicate that no callback is required. A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the property. One of the values, indicating options for statement execution and data retrieval. Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this , using one of the values, and retrieving one or more result sets from the server, given a callback procedure and state information. An that can be used to poll or wait for results, or both; this value is also needed when invoking , which returns a instance which can be used to retrieve the returned rows. 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 method to finish the operation and retrieve the returned by the command. The method returns immediately, but until the code executes the corresponding method call, it must not execute any other calls that start a synchronous or asynchronous execution against the same object. Calling the before the command's execution is completed causes the object to block until the execution is finished. The `callback` parameter lets you specify an delegate that is called when the statement has completed. You can call the method from within this delegate procedure, or from any other location within your application. In addition, you can pass any object in the `stateObject` parameter, and your callback procedure can retrieve this information using the property. The `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 is closed. Developers can also optimize the behavior of the by specifying the `SingleRow` value when it is known in advance that the Transact-SQL statement or stored procedure only returns a single row. 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 may block if more data is required and the underlying network's read operation blocks. 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. 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. If you use or 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 or to read FOR XML queries. This method ignores the property. ## Examples The following Windows application demonstrates the use of the method, executing a Transact-SQL statement that includes a delay of a few seconds (emulating a long-running command). Because the sample executes the command asynchronously, the form remains responsive while awaiting the results. This example passes the executing object as the `stateObject` parameter; doing so makes it simple to retrieve the object from within the callback procedure, so that the code can call the method corresponding to the initial call to . This example demonstrates many important techniques. This includes calling a method that interacts with the form from a separate thread. In addition, this example demonstrates how you must block users from executing a command multiple times concurrently, and how you must make sure that the form does not close before the callback procedure is called. To set up this example, create a new Windows application. Put a control, a control, and a control on the form (accepting the default name for each control). Add the following code to the form's class, modifying the connection string as needed for your environment. This example passes the `CommandBehavior.CloseConnection` value in the `behavior` parameter, causing the returned to automatically close its connection when it is closed. [!code-csharp[SqlCommand_BeginExecuteReaderAsyncBehavior](~/../sqlclient/doc/samples/SqlCommand_BeginExecuteReaderAsyncBehavior.cs)] ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . Any error that occurred while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). - or - is set to true and a parameter with direction Output or InputOutput has been added to the collection. An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). To be added. To be added. To be added. To be added. Sends the to the and builds a . A object. property is set to `StoredProcedure`, the property should be set to the name of the stored procedure. The command executes this stored procedure when you call . > [!NOTE] > If a transaction is deadlocked, an exception may not be thrown until is called. The multiple active result set (MARS) feature allows for multiple actions using the same connection. If you use or 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 or to read FOR XML queries. ## Examples The following example creates a , and then executes it by passing a string that is a Transact-SQL SELECT statement, and a string to use to connect to the data source. [!code-csharp[SqlCommand_ExecuteReader](~/../sqlclient/doc/samples/SqlCommand_ExecuteReader.cs)] ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . An exception occurred while executing the command against a locked row. This exception is not generated when you are using Microsoft .NET Framework version 1.0. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The current state of the connection is closed. requires an open . -or- The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). One of the values. Sends the to the , and builds a using one of the values. A object. property is set to `StoredProcedure`, the property should be set to the name of the stored procedure. The command executes this stored procedure when you call . > [!NOTE] > Use to retrieve large values and binary data. Otherwise, an might occur and the connection will be closed. The multiple active result set (MARS) feature allows for multiple actions using the same connection. If you use or 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 or to read FOR XML queries. ## Examples The following example creates a , and then executes it by passing a string that is a Transact-SQL SELECT statement, and a string to use to connect to the data source. is set to . [!code-csharp[SqlCommand_ExecuteReader2](~/../sqlclient/doc/samples/SqlCommand_ExecuteReader2.cs#1)] ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The returned by the call to . Finishes asynchronous execution of a Transact-SQL statement, returning the requested . A object that can be used to retrieve the requested rows. to execute a Transact-SQL statement, you must call 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 instance returned by the method. If a callback procedure was specified in the call to , this method must be called. ## Examples For examples demonstrating the use of the method, see . ]]> parameter is null ( in Microsoft Visual Basic) was called more than once for a single command execution, or the method was mismatched against its execution method (for example, the code called to complete execution of a call to . The cancellation instruction. An asynchronous version of , which executes a Transact-SQL statement against the connection and returns the number of rows affected. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. A task representing the asynchronous operation. [!NOTE] > For long running queries on the server, consider using due to a known issue with canceling queries via a cancellation token. Also, consider canceling execution using the method. ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . Calling more than once for the same instance before task completion. -or- The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). SQL Server returned an error while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). To be added. To be added. To be added. To be added. To be added. An asynchronous version of , which sends the to the and builds a . Exceptions will be reported via the returned Task object. A task representing the asynchronous operation. [!NOTE] > For long running queries on the server, consider using due to a known issue with canceling queries via a cancellation token. Also, consider canceling execution using the method. ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . An invalid value. Calling more than once for the same instance before task completion. -or- The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). SQL Server returned an error while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). Options for statement execution and data retrieval. When is set to , reads the entire row before returning a complete Task. An asynchronous version of , which sends the to the , and builds a . Exceptions will be reported via the returned Task object. A task representing the asynchronous operation. A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . An invalid value. Calling more than once for the same instance before task completion. -or- closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). SQL Server returned an error while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The cancellation instruction. An asynchronous version of , which sends the to the and builds a . The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. A task representing the asynchronous operation. A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . An invalid value. Calling more than once for the same instance before task completion. -or- The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). SQL Server returned an error while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). Options for statement execution and data retrieval. When is set to , reads the entire row before returning a complete Task. The cancellation instruction. An asynchronous version of , which sends the to the , and builds a The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. A task representing the asynchronous operation. A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . An invalid value. Calling more than once for the same instance before task completion. -or- The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). SQL Server returned an error while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The cancellation instruction. An asynchronous version of , which executes the query asynchronously and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. A task representing the asynchronous operation. [!NOTE] > For long running queries on the server, consider using due to a known issue with canceling queries via a cancellation token. Also, consider canceling execution using the method. ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . Calling more than once for the same instance before task completion. -or- The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). SQL Server returned an error while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An asynchronous version of , which sends the to the and builds an object. Exceptions will be reported via the returned Task object. A task representing the asynchronous operation. [!NOTE] > For long running queries on the server, consider using due to a known issue with canceling queries via a cancellation token. Also, consider canceling execution using the method. ]]> A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . Calling more than once for the same instance before task completion. -or- The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). SQL Server returned an error while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The cancellation instruction. An asynchronous version of , which sends the to the and builds an object. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. A task representing the asynchronous operation. A other than **Binary** or **VarBinary** was used when was set to . For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). -or- A other than **Char**, **NChar**, **NVarChar**, **VarChar**, or **Xml** was used when was set to . -or- A other than **Xml** was used when was set to . Calling more than once for the same instance before task completion. -or- The closed or dropped during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). SQL Server returned an error while executing the command text. -or- A timeout occurred during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). An error occurred in a , or object during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). The , or object was closed during a streaming operation. For more information about streaming, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). Dictionary of custom column encryption key providersRegisters the encryption key store providers on the instance. If this function has been called, any providers registered using the or methods will be ignored. This function can be called more than once. This does shallow copying of the dictionary so that the app cannot alter the custom provider list once it has been set. A null dictionary was provided. -or- A string key in the dictionary was null or empty. -or- A value in the dictionary was null. A string key in the dictionary started with "MSSQL_". This prefix is reserved for system providers. This function walks through the registered custom column encryption key store providers and returns an object if found. Provider Name to be searched in custom provider dictionary. If the provider is found, initializes the corresponding SqlColumnEncryptionKeyStoreProvider instance. true if the provider is found, else returns false This function returns a list of the names of the custom providers currently registered. Combined list of provider names Resets the encryption related state of the command object and each of the parameters. BatchRPC doesn't need special handling to cleanup the state of each RPC object and its parameters since a new RPC object and parameters are generated on every execution. Steps to be executed in the Prepare Transparent Encryption finally block. Executes the reader after checking to see if we need to encrypt input parameters and then encrypting it if required. TryFetchInputParameterEncryptionInfo() -> ReadDescribeEncryptionParameterResults()-> EncryptInputParameters() ->RunExecuteReaderTds() Executes an RPC to fetch param encryption info from SQL Engine. If this method is not done writing the request to wire, it'll set the "task" parameter which can be used to create continuations. Indicates if this is a retry from a failed call. Constructs a SqlParameter with a given string value Read the output of sp_describe_parameter_encryption Resultset from calling to sp_describe_parameter_encryption Readonly dictionary with the map of parameter encryption rpc requests with the corresponding original rpc requests. Indicates if this is a retry from a failed call. This function constructs a string parameter containing the exec statement in the following format N'EXEC sp_name @param1=@param1, @param1=@param2, ..., @paramN=@paramN' TODO: Need to handle return values. Stored procedure name SqlParameter list A string SqlParameter containing the constructed sql statement value Get or add to the number of records affected by SpDescribeParameterEncryption. The below line is used only for debug asserts and not exposed publicly or impacts functionality otherwise. Clear the state in sqlcommand related to describe parameter encryption RPC requests. Set the column encryption setting to the new one. Do not allow conflicting column encryption settings. Creates a new object that is a copy of the current instance. A new object that is a copy of this instance. To be added. Represents a connection to a SQL Server database. This class cannot be inherited. object represents a unique session to a SQL Server data source. With a client/server database system, it is equivalent to a network connection to the server. is used together with and to increase performance when connecting to a Microsoft SQL Server database. For all third-party SQL Server products and other OLE DB-supported data sources, use . When you create an instance of , all properties are set to their initial values. For a list of these values, see the constructor. See for a list of the keywords in a connection string. If the goes out of scope, it won't be closed. Therefore, you must explicitly close the connection by calling `Close` or `Dispose`. `Close` and `Dispose` are functionally equivalent. If the connection pooling value `Pooling` is set to `true` or `yes`, the underlying connection is returned back to the connection pool. On the other hand, if `Pooling` is set to `false` or `no`, the underlying connection to the server is actually closed. > [!NOTE] > Login and logout events will not be raised on the server when a connection is fetched from or returned to the connection pool, because the connection is not actually closed when it is returned to the connection pool. For more information, see [SQL Server Connection Pooling (ADO.NET)](/sql/connect/ado-net/sql-server-connection-pooling). To ensure that connections are always closed, open the connection inside of a `using` block, as shown in the following code fragment. Doing so ensures that the connection is automatically closed when the code exits the block. ```vb Using connection As New SqlConnection(connectionString) connection.Open() ' Do work here; connection closed on following line. End Using ``` ```csharp using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); // Do work here; connection closed on following line. } ``` > [!NOTE] > To deploy high-performance applications, you must use connection pooling. When you use the .NET Framework Data Provider for SQL Server, you do not have to enable connection pooling because the provider manages this automatically, although you can modify some settings. For more information, see [SQL Server Connection Pooling (ADO.NET)](/sql/connect/ado-net/sql-server-connection-pooling). If a is generated by the method executing a , the remains open when the severity level is 19 or less. When the severity level is 20 or greater, the server ordinarily closes the . However, the user can reopen the connection and continue. An application that creates an instance of the object can require all direct and indirect callers to have sufficient permission to the code by setting declarative or imperative security demands. makes security demands using the object. Users can verify that their code has sufficient permissions by using the object. Users and administrators can also use the [Caspol.exe (Code Access Security Policy Tool)](/dotnet/framework/tools/caspol-exe-code-access-security-policy-tool) to modify security policy at the machine, user, and enterprise levels. For more information, see [Security in .NET](/dotnet/standard/security/). For an example demonstrating how to use security demands, see [Code Access Security and ADO.NET](/dotnet/framework/data/adonet/code-access-security). For more information about handling warning and informational messages from the server, see [Connection Events](/sql/connect/ado-net/connection-events). For more information about SQL Server engine errors and error messages, see [Database Engine Events and Errors](/sql/relational-databases/errors-events/database-engine-events-and-errors). > [!CAUTION] > You can force TCP instead of shared memory. You can do that by prefixing tcp: to the server name in the connection string or you can use localhost. ## Examples The following example creates a and a . The is opened and set as the for the . The example then calls . To accomplish this, the is passed a connection string and a query string that is a Transact-SQL INSERT statement. The connection is closed automatically when the code exits the using block. [!code-csharp[SqlCommand_ExecuteNonQuery Example#1](~/../sqlclient/doc/samples/SqlCommand_ExecuteNonQuery.cs#1)] ]]> Instance-level list of custom key store providers. It can be set more than once by the user. Global custom provider list should be provided by the user. We shallow copy the user supplied dictionary into a ReadOnlyDictionary. Global custom provider list can only supplied once per application. Dictionary object holding trusted key paths for various SQL Servers. Key to the dictionary is a SQL Server Name IList contains a list of trusted key paths. Gets or sets a value that specifies the object bound to this command. When set to null (default), the default non-retriable provider will be applied. type. 2. Create a by using one of the following static methods of the class: - - - - 3. Assign the object to the `RetryLogicProvider` property. > [!NOTE] > Detecting retriable exceptions is a vital part of the retry pattern. Before applying retry logic, it is important to investigate exceptions and choose a retry provider that best fits your scenario. First, log your exceptions and find transient faults. > [!NOTE] > The connection **timeout** restarts for each execution of a connection open. There is no timing overlap between these two actions. > [!NOTE] > The default retry logic provider is not enabled unless it is configured in an application configuration file. For more information, see [Configurable retry logic and configuration file](/sql/connect/ado-net/configurable-retry-logic-config-file-sqlclient). ## Example The following sample tries to open a connection to an invalid database to simulate a condition that the database service is temporarily unavailable . You should manually create the database while the tries to establish the connection. [!code-csharp[SqlConfigurableRetryLogic_OpenConnection#1](~/../sqlclient/doc/samples/SqlConfigurableRetryLogic_OpenConnection.cs#1)] ]]> Gets or sets the time-to-live for column encryption key entries in the column encryption key cache for the Always Encrypted feature. The default value is 2 hours. 0 means no caching at all.The time interval.To be added. Gets or sets a value that indicates whether query metadata caching is enabled (true) or not (false) for parameterized queries running against Always Encrypted enabled databases. The default value is true.Returns true if query metadata caching is enabled; otherwise false. true is the default. Allows you to set a list of trusted key paths for a database server. If while processing an application query the driver receives a key path that is not on the list, the query will fail. This property provides additional protection against security attacks that involve a compromised SQL Server providing fake key paths, which may lead to leaking key store credentials.The list of trusted master key paths for the column encryption.To be added. The connection used to open the SQL Server database.Initializes a new instance of the class when given a string that contains the connection string. is created, the read/write properties are set to the following initial values unless they are specifically set using their associated keywords in the property. |Properties|Initial value| |----------------|-------------------| ||`connectionString`| ||15| ||empty string ("")| ||empty string ("")| You can change the value for these properties only by using the property. The class provides functionality for creating and managing the contents of connection strings. ## Examples The following example creates and opens a . [!code-csharp[SqlConnection_SqlConnection1 Example#1](~/../sqlclient/doc/samples/SqlConnection_SqlConnection1.cs#1)] ]]> The supplied connection string argument failed validation. A connection string that does not use any of the following connection string keywords: , , or ; or that does not use .A object. If is null, is functionally equivalent to .Initializes a new instance of the class given a connection string, that does not use and a object that contains the user ID and password.To be added.The supplied arguments failed validation, including validation. This function walks through both instance-level and global custom column encryption key store providers and returns an object if found. Provider Name to be searched for. If the provider is found, initializes the corresponding SqlColumnEncryptionKeyStoreProvider instance. true if the provider is found, else returns false This function returns a list of system providers currently supported by this driver. Combined list of provider names This function returns a list of the names of the custom providers currently registered. If the instance-level cache is not empty, that cache is used, else the global cache is used. Combined list of provider names Is this connection using column encryption ? Dictionary of custom column encryption key store providers Registers the column encryption key store providers. This function should only be called once in an app. This does shallow copying of the dictionary so that the app cannot alter the custom provider list once it has been set. The built-in column master key store providers that are available for the Windows Certificate Store, CNG Store and CSP are pre-registered. customKeyStoreProviders = new Dictionary(); MySqlClientHSMProvider myProvider = new MySqlClientHSMProvider(); customKeyStoreProviders.Add(@"HSM Provider", myProvider); SqlConnection.RegisterColumnEncryptionKeyStoreProviders(customKeyStoreProviders); ``` ]]> A null dictionary was provided. -or- A string key in the dictionary was null or empty. -or- A value in the dictionary was null. A string key in the dictionary started with "MSSQL_". This prefix is reserved for system providers. This function was called more than once. Dictionary of custom column encryption key providersRegisters the encryption key store providers on the instance. If this function has been called, any providers registered using the static methods will be ignored. This function can be called more than once. This does shallow copying of the dictionary so that the app cannot alter the custom provider list once it has been set. A null dictionary was provided. -or- A string key in the dictionary was null or empty. -or- A value in the dictionary was null. A string key in the dictionary started with "MSSQL_". This prefix is reserved for system providers. Get enclave attestation url to be used with enclave based Always Encrypted Get attestation protocol Get IP address preference When set to , enables statistics gathering for the current connection.Returns if statistics gathering is enabled; otherwise . is the default. Gets or sets the string used to open a SQL Server database.The connection string that includes the source database name, and other parameters needed to establish the initial connection. The default value is an empty string. is similar to an OLE DB connection string, but is not identical. Unlike OLE DB or ADO, the connection string that is returned is the same as the user-set , minus security information if the Persist Security Info value is set to `false` (default). The .NET Framework Data Provider for SQL Server does not persist or return the password in a connection string unless you set Persist Security Info to `true`. You can use the property to connect to a database. The following example illustrates a typical connection string. ``` "Persist Security Info=False;Integrated Security=true;Initial Catalog=Northwind;server=(local)" ``` Use the new to construct valid connection strings at run time. For more information, see [Connection String Builders](/sql/connect/ado-net/connection-string-builders). The property can be set only when the connection is closed. Many of the connection string values have corresponding read-only properties. When the connection string is set, these properties are updated, except when an error is detected. In this case, none of the properties are updated. properties return only those settings that are contained in the . To connect to a local computer, specify "(local)" for the server. If a server name is not specified, a connection will be attempted to the default instance on the local computer. Resetting the on a closed connection resets all connection string values (and related properties) including the password. For example, if you set a connection string that includes "Database= AdventureWorks", and then reset the connection string to "Data Source=myserver;Integrated Security=true", the property is no longer set to "AdventureWorks". The connection string is parsed immediately after being set. If errors in syntax are found when parsing, a runtime exception, such as , is generated. Other errors can be found only when an attempt is made to open the connection. The basic format of a connection string includes a series of keyword/value pairs separated by semicolons. The equal sign (=) connects each keyword and its value. To include values that contain a semicolon, single-quote character, or double-quote character, the value must be enclosed in double quotation marks. If the value contains both a semicolon and a double-quote character, the value can be enclosed in single quotation marks. The single quotation mark is also useful if the value starts with a double-quote character. Conversely, the double quotation mark can be used if the value starts with a single quotation mark. If the value contains both single-quote and double-quote characters, the quotation mark character used to enclose the value must be doubled every time it occurs within the value. To include preceding or trailing spaces in the string value, the value must be enclosed in either single quotation marks or double quotation marks. Any leading or trailing spaces around integer, Boolean, or enumerated values are ignored, even if enclosed in quotation marks. However, spaces within a string literal keyword or value are preserved. Single or double quotation marks may be used within a connection string without using delimiters (for example, Data Source= my'Server or Data Source= my"Server), unless a quotation mark character is the first or last character in the value. Keywords are not case sensitive. The following table lists the valid names for keyword values within the . |Keyword|Default|Description| |-------------|-------------|-----------------| |Addr|N/A|Synonym of **Data Source**.| |Address|N/A|Synonym of **Data Source**.| |App|N/A|Synonym of **Application Name**.| |Application Intent

-or-

ApplicationIntent|ReadWrite|Declares the application workload type when connecting to a server. Possible values are `ReadOnly` and `ReadWrite`. For example:

`ApplicationIntent=ReadOnly`

For more information about SqlClient support for Always On Availability Groups, see [SqlClient Support for High Availability, Disaster Recovery](/sql/connect/ado-net/sql/sqlclient-support-high-availability-disaster-recovery).| |Application Name|N/A|The name of the application. If no application name is provided, 'Framework Microsoft SqlClient Data Provider' when running on .NET Framework and 'Core Microsoft SqlClient Data Provider' otherwise.

An application name can be 128 characters or less.| |AttachDBFilename

-or-

Extended Properties

-or-

Initial File Name|N/A|The name of the primary database file, including the full path name of an attachable database. AttachDBFilename is only supported for primary data files with an .mdf extension.

If the value of the AttachDBFileName key is specified in the connection string, the database is attached and becomes the default database for the connection.

If this key is not specified and if the database was previously attached, the database will not be reattached. The previously attached database will be used as the default database for the connection.

If this key is specified together with the AttachDBFileName key, the value of this key will be used as the alias. However, if the name is already used in another attached database, the connection will fail.

The path may be absolute or relative by using the DataDirectory substitution string. If DataDirectory is used, the database file must exist within a subdirectory of the directory pointed to by the substitution string. **Note:** Remote server, HTTP, and UNC path names are not supported.

The database name must be specified with the keyword 'database' (or one of its aliases) as in the following:

"AttachDbFileName=|DataDirectory|\data\YourDB.mdf;integrated security=true;database=YourDatabase"

An error will be generated if a log file exists in the same directory as the data file and the 'database' keyword is used when attaching the primary data file. In this case, remove the log file. Once the database is attached, a new log file will be automatically generated based on the physical path.| |Attestation Protocol|NotSpecified|Gets or sets the value of Attestation Protocol.

When no value is specified, secure enclaves are disabled on the connection.

Valid values are:
`AAS`
`HGS`
`None` (Only valid in v3.1 and v4.1+))| |Authentication|N/A|The authentication method used for [Connecting to SQL Database By Using Azure Active Directory Authentication](https://azure.microsoft.com/documentation/articles/sql-database-aad-authentication/#7-connect-to-your-database-by-using-azure-active-directory-identities).

Valid values are:

`Active Directory Integrated`, `Active Directory Interactive`, `Active Directory Password`, `Active Directory Service Principal`, `Active Directory Device Code Flow`, `Active Directory Managed Identity`, `Active Directory MSI`, `Active Directory Default`, `Sql Password`.

For additional information see [Using Azure Active Directory authentication with SqlClient](https://docs.microsoft.com/sql/connect/ado-net/sql/azure-active-directory-authentication?view=sql-server-ver15).| |Column Encryption Setting|disabled|Enables or disables [Always Encrypted](/sql/relational-databases/security/encryption/always-encrypted-database-engine) functionality for the connection. Supported values are: `enabled` and `disabled`| |Command Timeout|30|The default wait time (in seconds) before terminating the attempt to execute a command and generating an error.

Valid values are greater than or equal to 0 and less than or equal to 2147483647.| |Connect Retry Count

-or-

ConnectRetryCount|1|Controls the number of reconnection attempts after the client identifies an idle connection failure. Valid values are 0 to 255. 0 means do not attempt to reconnect (disable connection resiliency).

Note: Since version 5.x the default value for non Azure endpoints is 1. For Azure SQL endpoints, the default is 2. For Azure SQL serverless or on demand endpoints, the default is 5 to improve connection success for connections to an idle or paused instance.

For additional information about idle connection resiliency, see [.NET SqlConnection parameters for connection retry](https://learn.microsoft.com/azure/azure-sql/database/troubleshoot-common-connectivity-issues?view=azuresql#net-sqlconnection-parameters-for-connection-retry) and [Technical Article - Idle Connection Resiliency](https://go.microsoft.com/fwlink/?LinkId=393996).| |Connect Retry Interval

-or-

ConnectRetryInterval|10|Specifies the time between each connection retry attempt (`ConnectRetryCount`). Valid values are 1 to 60 seconds (default=10), applied after the first reconnection attempt. When a broken connection is detected, the client immediately attempts to reconnect; this is the first reconnection attempt and only occurs if `ConnectRetryCount` is greater than 0. If the first reconnection attempt fails and `ConnectRetryCount` is greater than 1, the client waits `ConnectRetryInterval` to try the second and subsequent reconnection attempts.

For additional information about idle connection resiliency, see[.NET SqlConnection parameters for connection retry](https://learn.microsoft.com/azure/azure-sql/database/troubleshoot-common-connectivity-issues?view=azuresql#net-sqlconnection-parameters-for-connection-retry) and [Technical Article - Idle Connection Resiliency](https://go.microsoft.com/fwlink/?LinkId=393996).| |Connect Timeout

-or-

Connection Timeout

-or-

Timeout|15|The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.

Valid values are greater than or equal to 0 and less than or equal to 2147483647.

When opening a connection to a Azure SQL Database, set the connection timeout to 30 seconds.| |Current Language

-or-

Language|N/A|Sets the language used for database server warning or error messages.

The language name can be 128 characters or less.| |Data Source

-or-

Server

-or-

Address

-or-

Addr

-or-

Network Address|N/A|The name or network address of the instance of SQL Server to which to connect. The port number can be specified after the server name:

`server=tcp:servername, portnumber`

When specifying a local instance, always use (local). To force a protocol, add one of the following prefixes:

`np:(local), tcp:(local), lpc:(local)`

You can also connect to a LocalDB database as follows:

`server=(localdb)\\myInstance`

For more information about LocalDB, see [SqlClient Support for LocalDB](/sql/connect/ado-net/sql/sqlclient-support-localdb).

**Data Source** must use the TCP format or the Named Pipes format.

TCP format is as follows:

- tcp:\\\
- tcp:\,\

The TCP format must start with the prefix "tcp:" and is followed by the database instance, as specified by a host name and an instance name. This format is not applicable when connecting to Azure SQL Database. TCP is automatically selected for connections to Azure SQL Database when no protocol is specified.

The host name MUST be specified in one of the following ways:

- NetBIOSName
- IPv4Address
- IPv6Address

The instance name is used to resolve to a particular TCP/IP port number on which a database instance is hosted. Alternatively, specifying a TCP/IP port number directly is also allowed. If both instance name and port number are not present, the default database instance is used.

The Named Pipes format is as follows:

- np:\\\\\pipe\\

The Named Pipes format MUST start with the prefix "np:" and is followed by a named pipe name.

The host name MUST be specified in one of the following ways:

- NetBIOSName
- IPv4Address
- IPv6Address

The pipe name is used to identify the database instance to which the .NET application will connect.

If the value of the **Network** key is specified, the prefixes "tcp:" and "np:" should not be specified. **Note:** You can force the use of TCP instead of shared memory, either by prefixing **tcp:** to the server name in the connection string, or by using **localhost**.| |Enclave Attestation Url|N/A|Gets or sets the enclave attestation URL to be used with enclave based Always Encrypted.| |Encrypt|'true' in 4.0 and above

'false' in 3.x and below|Recognized values are:
versions 1 - 4: `true`/`yes` and `false`/`no`
versions 5+: `true`/`yes`/`mandatory`, `false`/`no`/`optional` and `strict`. When `true`, TLS encryption is used for all data sent between the client and server if the server has a certificate installed. When `strict`, TDS 8.0 TLS encryption is used and the `TrustServerCertificate` setting is ignored and treated as false. For more information, see [Connection String Syntax](/sql/connect/ado-net/connection-string-syntax).

When `Encrypt` is `mandatory` or `strict` and `TrustServerCertificate` is `false`, the server name (or IP address) in a server's certificate must exactly match the server name (or IP address) specified in the connection string. Otherwise, the connection attempt will fail. | |Enlist|'true'|`true` indicates that the SQL Server connection pooler automatically enlists the connection in the creation thread's current transaction context.| |Failover Partner|N/A|The name of the failover partner server where database mirroring is configured.

If the value of this key is "", then **Initial Catalog** must be present, and its value must not be "".

The server name can be 128 characters or less.

If you specify a failover partner but the failover partner server is not configured for database mirroring and the primary server (specified with the Server keyword) is not available, then the connection will fail.

If you specify a failover partner and the primary server is not configured for database mirroring, the connection to the primary server (specified with the Server keyword) will succeed if the primary server is available.| |Failover Partner SPN

-or-

FailoverPartnerSPN|N/A|The SPN for the failover partner. The default value is an empty string, which causes SqlClient to use the default, driver-generated SPN.

(Only available in v5.0+)| |Host Name In Certificate

-or-

HostNameInCertificate|N/A|The host name to use when validating the server certificate. When not specified, the server name from the Data Source is used for certificate validation.

(Only available in v5.0+)| |Server Certificate

-or-

ServerCertificate|N/A|The path to a certificate file to match against the SQL Server TLS/SSL certificate. The accepted certificate formats are PEM, DER, and CER. If specified, the SQL Server certificate is checked by verifying if the ServerCertificate provided is an exact match.

(Only available in v5.1+)| |Initial Catalog

-or-

Database|N/A|The name of the database.

The database name can be 128 characters or less.| |Integrated Security

-or-

Trusted_Connection|'false'|When `false`, User ID and Password are specified in the connection. When `true`, the current Windows account credentials are used for authentication.

Recognized values are `true`, `false`, `yes`, `no`, and `sspi` (strongly recommended), which is equivalent to `true`.

If User ID and Password are specified and Integrated Security is set to true, the User ID and Password will be ignored and Integrated Security will be used.

is a more secure way to specify credentials for a connection that uses SQL Server Authentication (`Integrated Security=false`).| |IP Address Preference

-or-

IPAddressPreference|IPv4First|The IP address family preference when establishing TCP connections. If `Transparent Network IP Resolution` (in .NET Framework) or `Multi Subnet Failover` is set to true, this setting has no effect. Supported values include:

`IPAddressPreference=IPv4First`

`IPAddressPreference=IPv6First`

`IPAddressPreference=UsePlatformDefault`| |Load Balance Timeout

-or-

Connection Lifetime|0|When a connection is returned to the pool, its creation time is compared with the current time, and the connection is destroyed if that time span (in seconds) exceeds the value specified by `Connection Lifetime`. This is useful in clustered configurations to force load balancing between a running server and a server just brought online.

A value of zero (0) causes pooled connections to have the maximum connection timeout.| |Max Pool Size|100|The maximum number of connections that are allowed in the pool.

Valid values are greater than or equal to 1. Values that are less than **Min Pool Size** generate an error.| |Min Pool Size|0|The minimum number of connections that are allowed in the pool.

Valid values are greater than or equal to 0. Zero (0) in this field means no minimum connections are initially opened.

Values that are greater than **Max Pool Size** generate an error.| |Multiple Active Result Sets

-or-

MultipleActiveResultSets|false|When `true`, an application can maintain multiple active result sets (MARS). When `false`, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection.

Recognized values are `true` and `false`.

For more information, see [Multiple Active Result Sets (MARS)](/sql/connect/ado-net/sql/multiple-active-result-sets-mars).| |Multi Subnet Failover

-or-

MultiSubnetFailover|false|Always specify `multiSubnetFailover=True` when connecting to the availability group listener of a SQL Server 2012 (or later) availability group or a SQL Server 2012 (or later) Failover Cluster Instance. `multiSubnetFailover=True` configures SqlClient to provide faster detection of and connection to the (currently) active server. Possible values are `Yes` and `No`, `True` and `False` or `1` and `0`. For example:

`MultiSubnetFailover=True`

The default is `False`. For more information about SqlClient's support for Always On AGs, see [SqlClient Support for High Availability, Disaster Recovery](/sql/connect/ado-net/sql/sqlclient-support-high-availability-disaster-recovery).| |Network Library

-or-

Network

-or-

Net|N/A|The network library used to establish a connection to an instance of SQL Server. Supported values include:

dbnmpntw (Named Pipes)

dbmsrpcn (Multiprotocol, Windows RPC)

dbmsadsn (Apple Talk)

dbmsgnet (VIA)

dbmslpcn (Shared Memory)

dbmsspxn (IPX/SPX)

dbmssocn (TCP/IP)

Dbmsvinn (Banyan Vines)

The corresponding network DLL must be installed on the system to which you connect. If you do not specify a network and you use a local server (for example, "." or "(local)"), shared memory is used. In this example, the network library is Win32 Winsock TCP/IP (dbmssocn), and 1433 is the port being used.

`Network Library=dbmssocn;Data Source=000.000.000.000,1433;`| |Packet Size|8000|Size in bytes of the network packets used to communicate with an instance of SQL Server.

The packet size can be greater than or equal to 512 and less than or equal to 32768.| |Password

-or-

PWD|N/A|The password for the SQL Server account logging on. Not recommended. To maintain a high level of security, we strongly recommend that you use the `Integrated Security` or `Trusted_Connection` keyword instead. is a more secure way to specify credentials for a connection that uses SQL Server Authentication.

The password must be 128 characters or less.| |Persist Security Info

-or-

PersistSecurityInfo|'false'|When set to `false` or `no` (strongly recommended), security-sensitive information, such as the password or access token, is not returned as part of the connection if the connection is open or has ever been in an open state. This property should only be set to `true` if your application has a specific need to read the password out of an already-opened database connection. The default value of `false` is the more secure setting; using `true` for this property opens your application to security risks such as accidentally logging or tracing the database password.

Resetting the connection string resets all connection string values including the password. Recognized values are `true`, `false`, `yes`, and `no`.| |Pool Blocking Period

-or-

PoolBlockingPeriod|Auto|Sets the blocking period behavior for a connection pool. See property for details.| |Pooling|'true'|When the value of this key is set to true, any newly created connection will be added to the pool when closed by the application. In a next attempt to open the same connection, that connection will be drawn from the pool.

Connections are considered the same if they have the same connection string. Different connections have different connection strings.

The value of this key can be "true", "false", "yes", or "no".| |Replication|'false'|`true` if replication is supported using the connection.| |Server SPN

-or-

ServerSPN|N/A|The SPN for the data source. The default value is an empty string, which causes SqlClient to use the default, driver-generated SPN.

(Only available in v5.0+)| |Transaction Binding|Implicit Unbind|Controls connection association with an enlisted `System.Transactions` transaction.

Possible values are:

`Transaction Binding=Implicit Unbind;`

`Transaction Binding=Explicit Unbind;`

Implicit Unbind causes the connection to detach from the transaction when it ends. After detaching, additional requests on the connection are performed in autocommit mode. The `System.Transactions.Transaction.Current` property is not checked when executing requests while the transaction is active. After the transaction has ended, additional requests are performed in autocommit mode.

If the system ends the transaction (in the scope of a using block) before the last command completes, it will throw .

Explicit Unbind causes the connection to remain attached to the transaction until the connection is closed or an explicit `SqlConnection.TransactionEnlist(null)` is called. Beginning in .NET Framework 4.0, changes to Implicit Unbind make Explicit Unbind obsolete. An `InvalidOperationException` is thrown if `Transaction.Current` is not the enlisted transaction or if the enlisted transaction is not active.| |Transparent Network IP Resolution

-or-

TransparentNetworkIPResolution|See description.|When the value of this key is set to `true`, the application is required to retrieve all IP addresses for a particular DNS entry and attempt to connect with the first one in the list. If the connection is not established within 0.5 seconds, the application will try to connect to all others in parallel. When the first answers, the application will establish the connection with the respondent IP address.

If the `MultiSubnetFailover` key is set to `true`, `TransparentNetworkIPResolution` is ignored.

If the `Failover Partner` key is set, `TransparentNetworkIPResolution` is ignored.

The value of this key must be `true`, `false`, `yes`, or `no`.

A value of `yes` is treated the same as a value of `true`.

A value of `no` is treated the same as a value of `false`.

The default values are as follows:

  • `false` when:

    • Connecting to Azure SQL Database where the data source ends with:

      • .database.chinacloudapi.cn
      • .database.usgovcloudapi.net
      • .database.cloudapi.de
      • .database.windows.net
    • `Authentication` is 'Active Directory Password' or 'Active Directory Integrated'
  • `true` in all other cases.
| |Trust Server Certificate

-or-

TrustServerCertificate|'false'|When set to `true`, TLS is used to encrypt the channel when bypassing walking the certificate chain to validate trust. If TrustServerCertificate is set to `true` and Encrypt is set to `false`, the channel is not encrypted. Recognized values are `true`, `false`, `yes`, and `no`. For more information, see [Connection String Syntax](/sql/connect/ado-net/connection-string-syntax).| |Type System Version|N/A|A string value that indicates the type system the application expects. The functionality available to a client application is dependent on the version of SQL Server and the compatibility level of the database. Explicitly setting the type system version that the client application was written for avoids potential problems that could cause an application to break if a different version of SQL Server is used. **Note:** The type system version cannot be set for common language runtime (CLR) code executing in-process in SQL Server. For more information, see [SQL Server Common Language Runtime Integration](/dotnet/framework/data/adonet/sql/sql-server-common-language-runtime-integration).

Possible values are:

`Type System Version=SQL Server 2012;`

`Type System Version=SQL Server 2008;`

`Type System Version=SQL Server 2005;`

`Type System Version=Latest;`

`Type System Version=SQL Server 2012;` specifies that the application will require version 11.0.0.0 of Microsoft.SqlServer.Types.dll. The other `Type System Version` settings will require version 10.0.0.0 of Microsoft.SqlServer.Types.dll.

`Latest` is obsolete and should not be used. `Latest` is equivalent to `Type System Version=SQL Server 2008;`.| |User ID

-or-

UID

-or-

User|N/A|The SQL Server login account. Not recommended. To maintain a high level of security, we strongly recommend that you use the `Integrated Security` or `Trusted_Connection` keywords instead. is a more secure way to specify credentials for a connection that uses SQL Server Authentication.

The user ID must be 128 characters or less.| |User Instance|'false'|A value that indicates whether to redirect the connection from the default SQL Server Express instance to a runtime-initiated instance running under the account of the caller.| |Workstation ID

-or-

WSID|The local computer name|The name of the workstation connecting to SQL Server.

The ID must be 128 characters or less.| The following list contains the valid names for connection pooling values within the . For more information, see [SQL Server Connection Pooling (ADO.NET)](/sql/connect/ado-net/sql-server-connection-pooling). - Connection Lifetime (or Load Balance Timeout) - Enlist - Max Pool Size - Min Pool Size - Pooling When you are setting keyword or connection pooling values that require a Boolean value, you can use 'yes' instead of 'true', and 'no' instead of 'false'. Integer values are represented as strings. > [!NOTE] > The .NET Framework Data Provider for SQL Server uses its own protocol to communicate with SQL Server. Therefore, it does not support the use of an ODBC data source name (DSN) when connecting to SQL Server because it does not add an ODBC layer. > [!NOTE] > Universal data link (UDL) files are not supported for the .NET Framework Data Provider for SQL Server. > [!CAUTION] > In this release, the application should use caution when constructing a connection string based on user input (for example when retrieving user ID and password information from a dialog box, and appending it to the connection string). The application should make sure that a user cannot embed additional connection string parameters in these values (for example, entering a password as "validpassword;database=somedb" in an attempt to attach to a different database). If you need to construct connection strings based on user input, use the new , which validates the connection string and helps to eliminate this problem. See [Connection String Builders](/sql/connect/ado-net/connection-string-builders) for more information. ## Examples The following example creates a and sets the property before opening the connection. [!code-csharp[SqlConnection_ConnectionString Example#1](~/../sqlclient/doc/samples/SqlConnection_ConnectionString.cs#1)] ]]>
An invalid connection string argument has been supplied, or a required connection string argument has not been supplied.
Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.The time (in seconds) to wait for a connection to open. The default value is 15 seconds. because an attempt to connect waits indefinitely. ## Examples The following example creates a and sets the `Connection Timeout` to 30 seconds in the connection string. The code opens the connection and displays the property in the console window. [!code-csharp[SqlConnection_ConnectionTimeout Example#1](~/../sqlclient/doc/samples/SqlConnection_ConnectionTimeout.cs#1)] ]]> The value set is less than 0. Gets the default wait time (in seconds) before terminating the attempt to execute a command and generating an error. The default is 30 seconds. The time in seconds to wait for the command to execute. The default is 30 seconds. Gets or sets the access token for the connection.The access token for the connection. 0 along with AccessToken, you must call after the access token expires to ensure the connection pool doesn't maintain those connections indefinitely. ]]> Gets or sets the access token callback for the connection. The Func that takes a and and returns a . . [!code-csharp[SqlConnection_AccessTokenCallback Example#1](~/../sqlclient/doc/samples/SqlConnection_AccessTokenCallback.cs#1)] ]]> The AccessTokenCallback is combined with other conflicting authentication configurations. Gets the name of the current database or the database to be used after a connection is opened.The name of the current database or the name of the database to be used after a connection is opened. The default value is an empty string. property updates dynamically. If you change the current database using a Transact-SQL statement or the method, an informational message is sent and the property is updated automatically. ## Examples The following example creates a and displays some of its read-only properties. [!code-csharp[SqlConnection_Database Example#1](~/../sqlclient/doc/samples/SqlConnection_Database.cs#1)] ]]> To indicate the IsSupported flag sent by the server for DNS Caching. This property is for internal testing only. To indicate the IsSupported flag sent by the server for DNS Caching before redirection. This property is for internal testing only. Gets the name of the instance of SQL Server to which to connect.The name of the instance of SQL Server to which to connect. The default value is an empty string. and displays some of its read-only properties. [!code-csharp[SqlConnection_DataSource Example#1](~/../sqlclient/doc/samples/SqlConnection_DataSource.cs#1)] ]]> Gets the size (in bytes) of network packets used to communicate with an instance of SQL Server.The size (in bytes) of network packets. The default value is 8000. ), which is sufficient for most data transfer operations. For most applications, the default packet size is best. may be a value in the range of 512 and 32767 bytes. An exception is generated if the value is outside this range. Setting the default value to a number greater than 8000 will cause the packets to use the MultiPage allocator on the instance of SQL Server instead of the much more efficient SinglePage allocator, reducing the overall scalability of the SQL Server. For more information on how SQL Server uses memory, see [Memory Management Architecture Guide](/sql/relational-databases/memory-management-architecture-guide). ## Examples The following example creates a , including setting the `Packet Size` to 512 in the connection string. It displays the and properties in the console window. [!code-csharp[SqlConnection_PacketSize Example#1](~/../sqlclient/doc/samples/SqlConnection_PacketSize.cs#1)] ]]> The connection ID of the most recent connection attempt, regardless of whether the attempt succeeded or failed.The connection ID of the most recent connection attempt. works regardless of which version of the server you connect to, but extended events logs and entry on connectivity ring buffer errors will not be present in SQL Server 2008 R2 and earlier. You can locate the connection ID in the extended events log to see if the failure was on the server if the extended event for logging connection ID is enabled. You can also locate the connection ID in the connection ring buffer ([Connectivity troubleshooting in SQL Server 2008 with the Connectivity Ring Buffer](https://go.microsoft.com/fwlink/?LinkId=207752)) for certain connection errors. If the connection ID is not in the connection ring buffer, you can assume a network error. ]]> Gets a string that contains the version of the instance of SQL Server to which the client is connected.The version of the instance of SQL Server. was called while the returned Task was not completed and the connection was not opened after a call to . ## Examples The following example creates a and displays the property. [!code-csharp[SqlConnection_ServerVersion Example#1](~/../sqlclient/doc/samples/SqlConnection_ServerVersion.cs#1)] ]]> The connection is closed. was called while the returned Task was not completed and the connection was not opened after a call to . Gets the server process Id (SPID) of the active connection.The server process Id (SPID) of the active connection.Returns 0 if the connection is inactive on the client side. Indicates the state of the during the most recent network operation performed on the connection.An enumeration. enumeration indicating the state of the . Closing and reopening the connection will refresh the value of . ]]> Gets a string that identifies the database client.A string that identifies the database client. If not specified, the name of the client computer. If neither is specified, the value is an empty string. property corresponds to the `Workstation ID` connection string property. ## Examples The following example creates a and displays the property. [!code-csharp[SqlConnection_WorkstationId Example#1](~/../sqlclient/doc/samples/SqlConnection_WorkstationId.cs#1)] ]]> Gets or sets the object for this connection.The object for this connection. object with . The default value of is null. An exception will be raised: - If is set on an open connection. - If is set when `Integrated Security = true`. - If is set when the connection string uses `Password`. - If is set when the connection string uses `UserID`. ]]> To be added.To be added.To be added. Occurs when SQL Server returns a warning or informational message. delegate to listen to this event. The event occurs when a message with a severity of 10 or less is returned by SQL Server. Messages that have a severity between 11 and 20 raise an error and messages that have a severity over 20 causes the connection to close. For more information on SQL Server error levels, see [Database Engine Error Severities](/sql/relational-databases/errors-events/database-engine-error-severities). For more information and an example, see [Connection Events](/sql/connect/ado-net/connection-events). ]]> Gets or sets the property. if the property has been set; otherwise . to `true`, errors that were previously treated as exceptions are now handled as events. All events fire immediately and are handled by the event handler. If is is set to `false`, then events are handled at the end of the procedure. > [!NOTE] > An error with a severity level of 17 or above that causes the server to stop processing the command needs to be handled as an exception. In this case, an exception is thrown regardless of how the error is handled in the event. For more information on working with events, see [Connection Events](/sql/connect/ado-net/connection-events). For more information on errors generated by the SQL Server engine, see [Database Engine Errors](/sql/relational-databases/errors-events/database-engine-events-and-errors). ]]> To be added.To be added.To be added. Starts a database transaction.An object representing the new transaction. or method. To make sure that the .NET Framework Data Provider for SQL Server transaction management model performs correctly, avoid using other transaction management models, such as the one provided by SQL Server. > [!NOTE] > If you do not specify an isolation level, the default isolation level is used. To specify an isolation level with the method, use the overload that takes the `iso` parameter (). The isolation level set for a transaction persists after the transaction is completed and until the connection is closed or disposed. Setting the isolation level to **Snapshot** in a database where the snapshot isolation level is not enabled does not throw an exception. The transaction will complete using the default isolation level. > [!CAUTION] > If a transaction is started and a level 16 or higher error occurs on the server, the transaction will not be rolled back until the method is invoked. No exception is thrown on **ExecuteReader**. > [!CAUTION] > When your query returns a large amount of data and calls `BeginTransaction`, a is thrown because SQL Server does not allow parallel transactions when using MARS. To avoid this problem, always associate a transaction with the command, the connection, or both before any readers are open. For more information on SQL Server transactions, see [Transactions (Transact-SQL)](/sql/t-sql/language-elements/transactions-transact-sql). ## Examples The following example creates a and a . It also demonstrates how to use the , a , and methods. [!code-csharp[SqlConnection_BeginTransaction Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction.cs#1)] ]]> Parallel transactions are not allowed when using Multiple Active Result Sets (MARS).Parallel transactions are not supported. The isolation level under which the transaction should run.Starts a database transaction with the specified isolation level.An object representing the new transaction. or method. To make sure that the .NET Framework Data Provider for SQL Server transaction management model performs correctly, avoid using other transaction management models, such as the one provided by SQL Server. > [!NOTE] > After a transaction is committed or rolled back, the isolation level of the transaction persists for all subsequent commands that are in autocommit mode (the SQL Server default). This can produce unexpected results, such as an isolation level of REPEATABLE READ persisting and locking other users out of a row. To reset the isolation level to the default (READ COMMITTED), execute the Transact-SQL SET TRANSACTION ISOLATION LEVEL READ COMMITTED statement, or call followed immediately by . For more information on SQL Server isolation levels, see [Transaction Isolation Levels](/sql/t-sql/language-elements/transaction-isolation-levels). For more information on SQL Server transactions, see [Transactions (Transact-SQL)](/sql/t-sql/language-elements/transactions-transact-sql). > [!CAUTION] > When your query returns a large amount of data and calls `BeginTransaction`, a is thrown because SQL Server does not allow parallel transactions when using MARS. To avoid this problem, always associate a transaction with the command, the connection, or both before any readers are open. ## Examples The following example creates a and a . It also demonstrates how to use the , a , and methods. [!code-csharp[SqlConnection_BeginTransaction1 Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction1.cs#1)] ]]> Parallel transactions are not allowed when using Multiple Active Result Sets (MARS).Parallel transactions are not supported. The name of the transaction.Starts a database transaction with the specified transaction name.An object representing the new transaction. and in the `savePoint` parameter of the method. You must explicitly commit or roll back the transaction using the or method. To make sure that the .NET Data Provider for SQL Server transaction management model performs correctly, avoid using other transaction management models, such as the one provided by SQL Server. For more information on SQL Server transactions, see [Transactions (Transact-SQL)](/sql/t-sql/language-elements/transactions-transact-sql). > [!CAUTION] > When your query returns a large amount of data and calls `BeginTransaction`, a is thrown because SQL Server does not allow parallel transactions when using MARS. To avoid this problem, always associate a transaction with the command, the connection, or both before any readers are open. ## Examples The following example creates a and a . It also demonstrates how to use the , a , and methods. [!code-csharp[SqlConnection_BeginTransaction2 Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction2.cs#1)] ]]> Parallel transactions are not allowed when using Multiple Active Result Sets (MARS).Parallel transactions are not supported. To be added.To be added.To be added.To be added. The isolation level under which the transaction should run.The name of the transaction.Starts a database transaction with the specified isolation level and transaction name.An object representing the new transaction. and in the `savePoint` parameter of the method. You must explicitly commit or roll back the transaction using the or method. To make sure that the SQL Server transaction management model performs correctly, avoid using other transaction management models, such as the one provided by SQL Server. > [!NOTE] > After a transaction is committed or rolled back, the isolation level of the transaction persists for all subsequent commands that are in autocommit mode (the SQL Server default). This can produce unexpected results, such as an isolation level of REPEATABLE READ persisting and locking other users out of a row. To reset the isolation level to the default (READ COMMITTED), execute the Transact-SQL SET TRANSACTION ISOLATION LEVEL READ COMMITTED statement, or call followed immediately by . For more information on SQL Server isolation levels, see [Transaction Isolation Levels](/sql/t-sql/language-elements/transaction-isolation-levels). For more information on SQL Server transactions, see [Transactions (Transact-SQL)](/sql/t-sql/language-elements/transactions-transact-sql). > [!CAUTION] > When your query returns a large amount of data and calls `BeginTransaction`, a is thrown because SQL Server does not allow parallel transactions when using MARS. To avoid this problem, always associate a transaction with the command, the connection, or both before any readers are open. ## Examples The following example creates a and a . It also demonstrates how to use the , a , and methods. [!code-csharp[SqlConnection_BeginTransaction3 Example#1](~/../sqlclient/doc/samples/SqlConnection_BeginTransaction3.cs#1)] ]]> Parallel transactions are not allowed when using Multiple Active Result Sets (MARS).Parallel transactions are not supported. The name of the database to use instead of the current database.Changes the current database for an open . and displays some of its read-only properties. [!code-csharp[SqlConnection_Database Example#1](~/../sqlclient/doc/samples/SqlConnection_Database.cs#1)] ]]> The database name is not valid.The connection is not open.Cannot change the database. Empties the connection pool. resets (or empties) the connection pool. If there are connections in use at the time of the call, they are marked appropriately and will be discarded (instead of being returned to the pool) when is called on them. ]]> The to be cleared from the pool.Empties the connection pool associated with the specified connection. clears the connection pool that is associated with the `connection`. If additional connections associated with `connection` are in use at the time of the call, they are marked appropriately and are discarded (instead of being returned to the pool) when is called on them. ]]> Closes the connection to the database. This is the preferred method of closing any open connection. method rolls back any pending transactions. It then releases the connection to the connection pool, or closes the connection if connection pooling is disabled. > [!NOTE] > Pending transactions started using Transact-SQL or are automatically rolled back when the connection is reset if connection pooling is enabled. If connection pooling is off, the transaction is rolled back after `SqlConnection.Close` is called. Transactions started through are controlled through the `System.Transactions` infrastructure, and are not affected by `SqlConnection.Close`. An application can call more than one time. No exception is generated. If the goes out of scope, it won't be closed. Therefore, you must explicitly close the connection by calling `Close` or `Dispose`. `Close` and `Dispose` are functionally equivalent. If the connection pooling value `Pooling` is set to `true` or `yes`, the underlying connection is returned back to the connection pool. On the other hand, if `Pooling` is set to `false` or `no`, the underlying connection to the server is closed. > [!NOTE] > Login and logout events will not be raised on the server when a connection is fetched from or returned to the connection pool, because the connection is not actually closed when it is returned to the connection pool. For more information, see [SQL Server Connection Pooling (ADO.NET)](/sql/connect/ado-net/sql-server-connection-pooling). > [!CAUTION] > Do not call `Close` or `Dispose` on a Connection, a DataReader, or any other managed object in the `Finalize` method of your class. In a finalizer, you should only release unmanaged resources that your class owns directly. If your class does not own any unmanaged resources, do not include a `Finalize` method in your class definition. For more information, see [Garbage Collection](/dotnet/standard/garbage-collection/). ## Examples The following example creates a , opens it, displays some of its properties. The connection is automatically closed at the end of the `using` block. [!code-csharp[SqlConnection_Open Example#1](~/../sqlclient/doc/samples/SqlConnection_Open.cs#1)] ]]> The connection-level error that occurred while opening the connection. Creates and returns a object associated with the .A object. Opens a database connection with the property settings specified by the . draws an open connection from the connection pool if one is available. Otherwise, it establishes a new connection to an instance of SQL Server. > [!NOTE] > If the goes out of scope, it is not closed. Therefore, you must explicitly close the connection by calling . > [!NOTE] > If you specify a port number other than 1433 when you are trying to connect to an instance of SQL Server and using a protocol other than TCP/IP, the method fails. To specify a port number other than 1433, include "server=machinename,port number" in the connection string, and use the TCP/IP protocol. > [!NOTE] > The .NET Framework Data Provider for SQL Server requires the Security permission with "Allows calls to unmanaged assemblies" enabled ( with set to `UnmanagedCode`) to open a with SQL Debugging enabled. ## Examples The following example creates a , opens it, and displays some of its properties. The connection is automatically closed at the end of the `using` block. [!code-csharp[SqlConnection_Open Example#1](~/../sqlclient/doc/samples/SqlConnection_Open.cs#1)] ]]> Cannot open a connection without specifying a data source or server. or The connection is already open.A connection-level error occurred while opening the connection. If the property contains the value 18487 or 18488, this indicates that the specified password has expired or must be reset. See the method for more information. The tag in the app.config file has invalid or unknown elements.There are two entries with the same name in the section. Options to override default connection open behavior. Opens a database connection with the property settings specified by the . draws an open connection from the connection pool if one is available. Otherwise, it establishes a new connection to an instance of SQL Server. If overrides are specified, the first open attempt will apply the specified overrides to the open action. > [!NOTE] > If the goes out of scope, it is not closed. Therefore, you must explicitly close the connection by calling . > [!NOTE] > If you specify a port number other than 1433 when you are trying to connect to an instance of SQL Server and using a protocol other than TCP/IP, the method fails. To specify a port number other than 1433, include "server=machinename,port number" in the connection string, and use the TCP/IP protocol. > [!NOTE] > The .NET Framework Data Provider for SQL Server requires the Security permission with "Allows calls to unmanaged assemblies" enabled ( with set to `UnmanagedCode`) to open a with SQL Debugging enabled. ## Examples The following example creates a , opens it, and displays some of its properties. The connection is automatically closed at the end of the `using` block. [!code-csharp[SqlConnection_Open Example#1](~/../sqlclient/doc/samples/SqlConnection_Open.cs#1)] ]]> Cannot open a connection without specifying a data source or server. or The connection is already open. A connection-level error occurred while opening the connection. If the property contains the value 18487 or 18488, this indicates that the specified password has expired or must be reset. See the method for more information. The tag in the app.config file has invalid or unknown elements.There are two entries with the same name in the section. The cancellation instruction.An asynchronous version of , which opens a database connection with the property settings specified by the . The cancellation token can be used to request that the operation be abandoned before the connection timeout elapses. Exceptions will be propagated via the returned Task. If the connection timeout time elapses without successfully connecting, the returned Task will be marked as faulted with an Exception. The implementation returns a Task without blocking the calling thread for both pooled and non-pooled connections.A task representing the asynchronous operation. , must return until the returned is completed. Then, if the connection was successful, must return . If the connection fails, must return . A call to will attempt to cancel or close the corresponding call. For more information about asynchronous programming in the .NET Framework Data Provider for SQL Server, see [Asynchronous Programming](/sql/connect/ado-net/asynchronous-programming). ]]> Calling more than once for the same instance before task completion. A connection was not available from the connection pool before the connection time out elapsed.Any error returned by SQL Server that occurred while opening the connection. Returns schema information for the data source of this . For more information about scheme, see [SQL Server Schema Collections](/sql/connect/ado-net/sql-server-schema-collections).A that contains schema information.To be added. Specifies the name of the schema to return.Returns schema information for the data source of this using the specified string for the schema name.A that contains schema information. is specified as null. Specifies the name of the schema to return.A set of restriction values for the requested schema.Returns schema information for the data source of this using the specified string for the schema name and the specified string array for the restriction values.A that contains schema information. , see . ]]> is specified as null. The connection string that contains enough information to connect to the server that you want. The connection string must contain the user ID and the current password.The new password to set. This password must comply with any password security policy set on the server, including minimum length, requirements for specific characters, and so on.Changes the SQL Server password for the user indicated in the connection string to the supplied new password. method changes the SQL Server password for the user indicated in the supplied `connectionString` parameter to the value supplied in the `newPassword` parameter. If the connection string includes the option for integrated security (that is, "Integrated Security=True" or the equivalent), an exception is thrown. To determine that the password has expired, calling the method raises a . In order to indicate that the password that is contained within the connection string must be reset, the property for the exception contains the status value 18487 or 18488. The first value (18487) indicates that the password has expired and the second (18488) indicates that the password must be reset before logging in. This method opens its own connection to the server, requests the password change, and closes the connection as soon as it has completed. This connection is not retrieved from, nor returned to, the SQL Server connection pool. ## Examples The following is a simple example of changing a password: ```csharp class Program { static void Main(string[] args) { Microsoft.Data.SqlClient.SqlConnection.ChangePassword( "Data Source=a_server;Initial Catalog=a_database;UID=user;PWD=old_password", "new_password"); } } ``` ```vb Module Module1 Sub Main() Microsoft.Data.SqlClient.SqlConnection.ChangePassword( "Data Source=a_server;Initial Catalog=a_database;UID=user;PWD=old_password", "new_password") End Sub End Module ``` The following console application demonstrates the issues involved in changing a user's password because the current password has expired. [!code-csharp[SqlConnection_ConnectionString1#1](~/../sqlclient/doc/samples/SqlConnection_ConnectionString1.cs#1)] ]]> The connection string includes the option to use integrated security. Or The exceeds 128 characters.Either the or the parameter is null. The connection string that contains enough information to connect to a server. The connection string should not use any of the following connection string keywords: , , or ; or .A object.The new password. must be read only. The password must also comply with any password security policy set on the server (for example, minimum length and requirements for specific characters).Changes the SQL Server password for the user indicated in the object.To be added. The connection string contains any combination of , , or . -or- is greater than 128 characters. -or- is not read only. -or- is an empty string.One of the parameters (, , or ) is null. If statistics gathering is enabled, all values are reset to zero. Returns a name value pair collection of statistics at the point in time the method is called.Returns a reference of type of items. Returns a name value pair collection of internal properties at the point in time the method is called.Returns a reference of type of (string, object) items. Creates a new object that is a copy of the current instance.A new object that is a copy of this instance. instance is cast to an interface. This member is only supported by the .NET Compact Framework. ]]> Initializes a new instance of the class. is created, the read/write properties are set to the following initial values unless they are specifically set using their associated keywords in the property. |Properties|Initial value| |----------------|-------------------| ||empty string ("")| ||15| ||empty string ("")| ||empty string ("")| You can change the value for these properties only by using the property. The class provides functionality for creating and managing the contents of connection strings. ## Examples The following example creates and opens a . [!code-csharp[SqlConnection_SqlConnection Example#1](~/../sqlclient/doc/samples/SqlConnection_SqlConnection.cs#1)] ]]> To be added.To be added.To be added. To be added.To be added.To be added. A reference to an existing in which to enlist.Enlists in the specified transaction as a distributed transaction. method to enlist in a distributed transaction. Because it enlists a connection in a instance, **EnlistTransaction** takes advantage of functionality available in the namespace for managing distributed transactions, making it preferable to **EnlistDistributedTransaction**, which uses a **System.EnterpriseServices.ITransaction** object. It also has slightly different semantics: once a connection is explicitly enlisted on a transaction, it cannot be unenlisted or enlisted in another transaction until the first transaction finishes. For more information about distributed transactions, see [Distributed Transactions](/sql/connect/ado-net/distributed-transactions). ]]> Provides a way of reading a forward-only stream of rows from a SQL Server database. This class cannot be inherited. , you must call the method of the object, instead of directly using a constructor. While the is being used, the associated is busy serving the , and no other operations can be performed on the other than closing it. This is the case until the method of the is called. For example, you cannot retrieve output parameters until after you call . Changes made to a result set by another process or thread while data is being read may be visible to the user of the `SqlDataReader`. However, the precise behavior is timing dependent. and are the only properties that you can call after the is closed. Although the property may be accessed while the exists, always call before returning the value of to guarantee an accurate return value. When using sequential access (), an will be raised if the position is advanced and another read operation is attempted on the previous column. > [!NOTE] > For optimal performance, avoids creating unnecessary objects or making unnecessary copies of data. Therefore, multiple calls to methods such as return a reference to the same object. Use caution if you are modifying the underlying value of the objects returned by methods such as . ## Examples The following example creates a , a , and a . The example reads through the data, writing it out to the console window. The code then closes the . The is closed automatically at the end of the `using` code block. [!code-csharp[SqlDataReader_Read Example#1](~/../sqlclient/doc/samples/SqlDataReader_Read.cs#1)] ]]> Gets the associated with the .The associated with the .To be added. Gets the information with the .The associated with the .To be added. Gets a value that indicates the depth of nesting for the current row.The depth of nesting for the current row. Gets the number of columns in the current row.When not positioned in a valid recordset, 0; otherwise the number of columns in the current row. The default is -1. to 0. However. this should not be confused with a query that returns 0 rows (such as SELECT * FROM *table* WHERE 1 = 2) in which case returns the number of columns in the table, including hidden fields. Use to exclude hidden fields. ]]> There is no current connection to an instance of SQL Server. Gets a value that indicates whether the contains one or more rows. if the contains one or more rows; otherwise .To be added. Retrieves a Boolean value that indicates whether the specified instance has been closed. if the specified instance is closed; otherwise . instance that is closed. ]]> Gets the number of rows changed, inserted, or deleted by execution of the Transact-SQL statement.The number of rows changed, inserted, or deleted; 0 if no rows were affected or the statement failed; and -1 for SELECT statements. and are the only properties that you can call after the is closed. ]]> Gets the number of fields in the that are not hidden.The number of fields that are not hidden. are visible. For example, a SELECT on a partial primary key returns the remaining parts of the key as hidden fields. The hidden fields are always appended behind the visible fields. ]]> The zero-based column ordinal.Gets the value of the specified column in its native format given the column ordinal.The value of the specified column in its native format.To be added.The index passed was outside the range of 0 through . The column name.Gets the value of the specified column in its native format given the column name.The value of the specified column in its native format. No column with the specified name was found. To be added.To be added.To be added. Closes the object. method is called when you are through using the before using the associated for any other purpose. The `Close` method may either be called directly or through the `Dispose` method, disposing directly or in the context of [the using statement](/dotnet/csharp/language-reference/language-specification/statements#the-using-statement) block. The `Close` method populates the values for output parameters, return values and `RecordsAffected` on the by consuming any pending results. This may be a long operation depending on the amount of data to be consumed. If output values, return values, and `RecordsAffected` are not important to your application, the time to close may be shortened by calling the method of the associated object before the `Close` method is called. > [!CAUTION] > Do not call `Close` or `Dispose` on a Connection, a DataReader, or any other managed object in the `Finalize` method of your class. In a finalizer, you should only release unmanaged resources that your class owns directly. If your class does not own any unmanaged resources, do not include a `Finalize` method in your class definition. For more information, see [Garbage Collection](/dotnet/standard/garbage-collection/). ## Examples The following example creates a , a , and a . The example reads through the data, writing it out to the console window. The code then closes the . The is closed automatically at the end of the `using` code block. [!code-csharp[SqlDataReader_Close Example#1](~/../sqlclient/doc/samples/SqlDataReader_Close.cs#1)] ]]> The zero-based ordinal position of the column to find.Gets a string representing the data type of the specified column.The string representing the data type of the specified column. Returns an that iterates through the .An for the . The zero-based column ordinal.Gets the that is the data type of the object.The that is the data type of the object. If the type does not exist on the client, in the case of a User-Defined Type (UDT) returned from the database, **GetFieldType** returns null.To be added. The zero-based column ordinal.Gets the name of the specified column.The name of the specified column.To be added. An representing the column ordinal.Gets an that is a representation of the underlying provider-specific field type.Gets an that is a representation of the underlying provider-specific field type.To be added. The name of the column.Gets the column ordinal, given the name of the column.The zero-based column ordinal. method. [!code-csharp[SqlDataReader_GetOrdinal#1](~/../sqlclient/doc/samples/SqlDataReader_GetOrdinal.cs#1)] ]]> The name specified is not a valid column name. An representing the column ordinal.Gets an that is a representation of the underlying provider specific value.An that is a representation of the underlying provider specific value.To be added. An array of into which to copy the column values.Gets an array of objects that are a representation of the underlying provider specific values.The array of objects that are a representation of the underlying provider specific values.To be added. Returns a that describes the column metadata of the .A that describes the column metadata. method returns the following metadata about each column: |DataReader column|Description| |-----------------------|-----------------| |AllowDBNull|Set if the consumer can set the column to a null value or if the provider cannot determine whether the consumer can set the column to a null value. Otherwise, not set. A column may contain null values, even if it cannot be set to a null value.| |BaseCatalogName|The name of the catalog in the data store that contains the column. NULL if the base catalog name cannot be determined. The default of this column is a null value.| |BaseColumnName|The name of the column in the data store. This might be different than the column name returned in the ColumnName column if an alias was used. A null value if the base column name cannot be determined or if the rowset column is derived, but not identical to, a column in the data store. The default of this column is a null value.| |BaseSchemaName|The name of the schema in the data store that contains the column. A null value if the base schema name cannot be determined. The default of this column is a null value.| |BaseServerName|The name of the instance of Microsoft SQL Server used by the .| |BaseTableName|The name of the table or view in the data store that contains the column. A null value if the base table name cannot be determined. The default of this column is a null value.| |ColumnName|The name of the column; this might not be unique. If this cannot be determined, a null value is returned. This name always reflects the most recent renaming of the column in the current view or command text.| |ColumnOrdinal|The zero-based ordinal of the column. This column cannot contain a null value.| |ColumnSize|The maximum possible length of a value in the column. For columns that use a fixed-length data type, this is the size of the data type. For `nvarchar(MAX)`, `varchar(MAX)`, and `varbinary(MAX)` columns stored in a SQL Server database, the maximum size is 2GB. If these columns are stored and accessed as files, the limit on maximum size is imposed by the file system. This value changes when using the `Type System Version` keyword in the connection string. For new types they are represented as downlevel types. The MAX data types return the normal 4k for `nvarchar` and 8000 for `varchar`. For more information, see the [Transact-SQL reference](/sql/t-sql/language-reference).| |DataTypeName|Returns a string representing the data type of the specified column.| |IsAliased|`true`: The column name is an alias.

`false`: The column name is not an alias.| |IsAutoIncrement|`true`: The column assigns values to new rows in fixed increments.

`false`: The column does not assign values to new rows in fixed increments. The default of this column is `false`.| |IsColumnSet|`true`: The column is a sparse column that is a member of a column set.| |IsExpression|`true`: The column is an expression.

`false`: The column is not an expression.| |IsHidden|`true`: The column is hidden.

`false`: The column is not hidden.| |IsIdentity|`true`: The column is an identity column.

`false`: The column is not an identity column.| |IsKey|`true`: The column is one of a set of columns in the rowset that, taken together, uniquely identify the row. The set of columns with `IsKey` set to `true` must uniquely identify a row in the rowset. There is no requirement that this set of columns is a minimal set of columns. This set of columns may be generated from a base table primary key, a unique constraint or a unique index.

`false`: The column is not required to uniquely identify the row.| |IsLong|`true`: The column contains a Binary Long Object (BLOB) that contains very long data. The definition of very long data is provider-specific.

`false`: The column does not contain a Binary Long Object (BLOB) that contains very long data.| |IsReadOnly|`true`: The column cannot be modified.

`false`: The column can be modified.| |IsRowVersion|`true`: The column contains a persistent row identifier that cannot be written to, and has no meaningful value except to identity the row.

`false`: The column does not contain a persistent row identifier that cannot be written to, and has no meaningful value except to identity the row.| |IsUnique|`true`: Column is of type `timestamp`.

`false`: Column is not of type `timestamp`.| |NonVersionedProviderType|The type of the column irrespective of the current `Type System Version` specified in the connection string. The returned value is from the enumeration.| |NumericPrecision|If `ProviderType` is a numeric data type, this is the maximum precision of the column. The precision depends on the definition of the column. If `ProviderType` is not a numeric data type, this is 255.| |NumericScale|If `ProviderType` is DBTYPE_DECIMAL or DBTYPE_NUMERIC, the number of digits to the right of the decimal point. Otherwise, this is 255.| |ProviderSpecificDataType|Returns the provider-specific data type of the column based on the `Type System Version` keyword in the connection string.| |ProviderType|The indicator of the column's data type. If the data type of the column varies from row to row, this must be Object. This column cannot contain a null value.| |UdtAssemblyQualifiedName|If the column is a user-defined type (UDT), this is the qualified name of the UDT's assembly as per . If the column is not a UDT, this is null.| |XmlSchemaCollectionDatabase|The name of the database where the schema collection for this XML instance is located, if the row contains information about an XML column. This value is `null` (`Nothing` in Visual Basic) if the collection is defined within the current database. It is also null if there is no schema collection, in which case the `XmlSchemaCollectionName` and `XmlSchemaCollectionOwningSchema` columns are also null.| |XmlSchemaCollectionName|The name of the schema collection for this XML instance, if the row contains information about an XML column. This value is `null` (`Nothing` in Visual Basic) if there is no associated schema collection. If the value is null, the `XmlSchemaCollectionDatabase` and `XmlSchemaCollectionOwningSchema` columns are also null.| |XmlSchemaCollectionOwningSchema|The owning relational schema where the schema collection for this XML instance is located, if the row contains information about an XML column. This value is `null` (`Nothing` in Visual Basic) if the collection is defined within the current database. It is also null if there is no schema collection, in which case the `XmlSchemaCollectionDatabase` and `XmlSchemaCollectionName` columns are also null.| > [!NOTE] > To make sure that metadata columns return the correct information, you must call with the `behavior` parameter set to `KeyInfo`. Otherwise, some of the columns in the schema table may return default, null, or incorrect data. ]]>
The is closed.
The zero-based column ordinal.Gets the value of the specified column as a Boolean.The value of the column. to check for null values before calling this method. ]]> The specified cast is not valid. The value of the specified column.Retrieves data of type XML as an .The returned object. object returned by does not support asynchronous operations. If you require asynchronous operations on an , cast the XML column to an NVARCHAR(MAX) on the server and use with . exceptions raised from are thrown as exceptions; check the inner exception for the . will raise an exception when used on an object returned by when is in effect. For more information, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). ]]> The connection drops or is closed during the data retrieval. The is closed during the data retrieval. There is no data ready to be read (for example, the first hasn't been called, or returned false). Trying to read a previously read column in sequential mode. There was an asynchronous operation in progress. This applies to all Get* methods when running in sequential mode, as they could be called while reading a stream.Trying to read a column that does not exist.The returned type was not xml. The zero-based column ordinal.Retrieves binary, image, varbinary, UDT, and variant data types as a .A stream object. defaults to the value of ; but you can modify via . Null values will be returned as an empty (zero bytes) . will raise an exception when used on an object returned by when is in effect. exceptions raised from are thrown as exceptions; check the inner exception for the . The following members are not available for objects returned by : - BeginWrite - EndWrite - Length - Position - Seek - SetLength - Write - WriteByte - WriteTimeout For more information, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). ]]> The connection drops or is closed during the data retrieval. The is closed during the data retrieval. There is no data ready to be read (for example, the first hasn't been called, or returned false). Tried to read a previously-read column in sequential mode. There was an asynchronous operation in progress. This applies to all Get* methods when running in sequential mode, as they could be called while reading a stream.Trying to read a column that does not exist.The returned type was not one of the types below: - binary - image - varbinary - udt The zero-based column ordinal.Gets the value of the specified column as a byte.The value of the specified column as a byte. to check for null values before calling this method. ]]> The specified cast is not valid. The zero-based column ordinal.The index within the field from which to begin the read operation.The buffer into which to read the stream of bytes.The index within the where the write operation is to start.The maximum length to copy into the buffer.Reads a stream of bytes from the specified column offset into the buffer an array starting at the given buffer offset.The actual number of bytes read. returns the number of available bytes in the field. Most of the time this is the exact length of the field. However, the number returned may be less than the true length of the field if `GetBytes` has already been used to obtain bytes from the field. This may be the case, for example, if the is reading a large data structure into a buffer. For more information, see the `SequentialAccess` setting for . If you pass a buffer that is `null`, returns the length of the entire field in bytes, not the remaining size based on the buffer offset parameter. No conversions are performed; therefore, the data retrieved must already be a byte array. ]]> The column to be retrieved.Retrieves Char, NChar, NText, NVarChar, text, varChar, and Variant data types as a .The returned object. exceptions raised from are thrown as exceptions; check the inner exception for the . Null values will be returned as an empty (zero bytes) . will raise an exception when used on an object returned by when is in effect. For more information, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). ]]> The connection drops or is closed during the data retrieval. The is closed during the data retrieval. There is no data ready to be read (for example, the first hasn't been called, or returned false). Tried to read a previously-read column in sequential mode. There was an asynchronous operation in progress. This applies to all Get* methods when running in sequential mode, as they could be called while reading a stream.Trying to read a column that does not exist.The returned type was not one of the types below: - char - nchar - ntext - nvarchar - text - varchar The zero-based column ordinal.Gets the value of the specified column as a single character.The value of the specified column. . ]]> The specified cast is not valid. The zero-based column ordinal.The index within the field from which to begin the read operation.The buffer into which to read the stream of bytes.The index within the where the write operation is to start.The maximum length to copy into the buffer.Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.The actual number of characters read. returns the number of available characters in the field. Frequently this is the exact length of the field. However, the number returned may be less than the true length of the field if `GetChars` has already been used to obtain characters from the field. This may be the case, for example, if the is reading a large data structure into a buffer. For more information, see the `SequentialAccess` setting for . The actual number of characters read can be less than the requested length, if the end of the field is reached. If you pass a buffer that is `null`, returns the length of the entire field in characters, not the remaining size based on the buffer offset parameter. No conversions are performed; therefore. the data retrieved must already be a character array. > [!NOTE] > The method returns 0 when `dataIndex` is negative. ]]> The zero-based column ordinal.Gets the value of the specified column as a object.The value of the specified column. object. Call to check for null values before calling this method. ]]> The specified cast is not valid. The zero-based column ordinal.Gets the value of the specified column as a object.The value of the specified column. object. Call to check for null values before calling this method. ]]> The specified cast is not valid. The zero-based column ordinal.Gets the value of the specified column as a double-precision floating point number.The value of the specified column. to check for null values before calling this method. ]]> The specified cast is not valid. The zero-based column ordinal.Gets the value of the specified column as a single-precision floating point number.The value of the specified column. to check for null values before calling this method. ]]> The specified cast is not valid. The zero-based column ordinal.Gets the value of the specified column as a globally unique identifier (GUID).The value of the specified column. to check for null values before calling this method. ]]> The specified cast is not valid. The zero-based column ordinal.Gets the value of the specified column as a 16-bit signed integer.The value of the specified column. to check for null values before calling this method. ]]> The specified cast is not valid. The zero-based column ordinal.Gets the value of the specified column as a 32-bit signed integer.The value of the specified column. to check for null values before calling this method. ]]> The specified cast is not valid. The zero-based column ordinal.Gets the value of the specified column as a 64-bit signed integer.The value of the specified column. to check for null values before calling this method. ]]> The specified cast is not valid. The zero-based column ordinal.Gets the value of the specified column as a .The value of the column. The zero-based column ordinal.Gets the value of the specified column as a .The value of the column expressed as a . The zero-based column ordinal.Gets the value of the specified column as a .The value of the column expressed as a . The zero-based column ordinal.Gets the value of the specified column as .The value of the column expressed as a .To be added. The zero-based column ordinal.Gets the value of the specified column as .The value of the column expressed as a .To be added. The zero-based column ordinal.Gets the value of the specified column as a .The value of the column expressed as a . The zero-based column ordinal.Gets the value of the specified column as a .The value of the column expressed as a . The zero-based column ordinal.Gets the value of the specified column as a .The value of the column expressed as a . The zero-based column ordinal.Gets the value of the specified column as a .The value of the column expressed as a . The zero-based column ordinal.Gets the value of the specified column as a .The value of the column expressed as a . The zero-based column ordinal.Gets the value of the specified column as a .The value of the column expressed as a . The zero-based column ordinal.Gets the value of the specified column as a .The value of the column expressed as a . The zero-based column ordinal.Gets the value of the specified column as a .The value of the column expressed as a . The zero-based column ordinal.Gets the value of the specified column as a .The value of the column expressed as a . The zero-based column ordinal.Gets the value of the specified column as a .The value of the column expressed as a . The zero-based column ordinal.Gets the value of the specified column as an XML value.A value that contains the XML stored within the corresponding field. to check for null values before calling this method. ]]> The index passed was outside the range of 0 to - 1An attempt was made to read or access columns in a closed .The retrieved data is not compatible with the type. The zero-based column ordinal.Returns the data value in the specified column as a SQL Server type.The value of the column expressed as a . returns data using the native SQL Server types. To retrieve data using the .NET Framework types, see . ]]> An array of into which to copy the values. The column values are expressed as SQL Server types.Fills an array of that contains the values for all the columns in the record, expressed as SQL Server types.An integer indicating the number of columns copied. array does not need to match the number of columns in the record. You can pass an array that contains fewer than the number of columns contained in the record. Only the amount of data the array holds is copied to the array, starting at the column with ordinal 0. You can also pass an array whose length is more than the number of columns contained in the resulting row. Any remaining columns are untouched. ]]> is null. The zero-based column ordinal.Gets the value of the specified column as a string.The value of the specified column. to check for null values before calling this method. ]]> The specified cast is not valid. The type of the value to be returned.The column to be retrieved.Synchronously gets the value of the specified column as a type. is the asynchronous version of this method.The returned type object. .| For more information, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). ]]> The connection drops or is closed during the data retrieval. The is closed during the data retrieval. There is no data ready to be read (for example, the first hasn't been called, or returned false). Tried to read a previously-read column in sequential mode. There was an asynchronous operation in progress. This applies to all Get* methods when running in sequential mode, as they could be called while reading a stream.Trying to read a column that does not exist.The value of the column was null ( == ), retrieving a non-SQL type. doesn't match the type returned by SQL Server or cannot be cast. The zero-based column ordinal.Gets the value of the specified column in its native format.This method returns for null database columns. returns data using the .NET Framework types. ]]> The zero-based column ordinal.Retrieves the value of the specified column as a object.The value of the specified column. object. Call to check for null values before calling this method. ]]> The specified cast is not valid. The zero-based column ordinal.Retrieves the value of the specified column as a object.The value of the specified column. object. Call to check for null values before calling this method. ]]> The specified cast is not valid. An array of into which to copy the attribute columns.Populates an array of objects with the column values of the current row.The number of instances of in the array. array that contains fewer than the number of columns contained in the resulting row. Only the amount of data the array holds is copied to the array. You can also pass an array whose length is more than the number of columns contained in the resulting row. This method returns for null database columns. ## Examples The following example demonstrates using a correctly sized array to read all values from the current row in the supplied . In addition, the sample demonstrates using a fixed-sized array that could be either smaller or larger than the number of available columns. [!code-csharp[DataTableReader_GetValues#2](~/../sqlclient/doc/samples/DataTableReader_GetValues.cs#2)] ]]> The zero-based column ordinal.Gets a value that indicates whether the column contains non-existent or missing values. if the specified column value is equivalent to ; otherwise . , , and so on) to avoid raising an error. [!code-csharp[SqlDataReader_IsDBNull#1](~/../sqlclient/doc/samples/SqlDataReader_IsDBNull.cs#1)] ]]> A enumeration.Determines whether the specified matches that of the . if the specified is true, otherwise. Advances the data reader to the next result, when reading the results of batch Transact-SQL statements. if there are more result sets; otherwise . Advances the to the next record. if there are more rows; otherwise . is before the first record. Therefore, you must call to begin accessing any data. Only one `SqlDataReader` per associated may be open at a time, and any attempt to open another will fail until the first one is closed. Similarly, while the `SqlDataReader` is being used, the associated `SqlConnection` is busy serving it until you call . ## Examples The following example creates a , a , and a . The example reads through the data, writing it out to the console window. The code then closes the . The is closed automatically at the end of the `using` code block. [!code-csharp[SqlDataReader_Read Example#1](~/../sqlclient/doc/samples/SqlDataReader_Read.cs#1)] ]]> SQL Server returned an error while executing the command text. The cancellation instruction.An asynchronous version of , which advances the data reader to the next result, when reading the results of batch Transact-SQL statements. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.A task representing the asynchronous operation. Calling more than once for the same instance before task completion.SQL Server returned an error while executing the command text. The cancellation instruction.An asynchronous version of , which advances the to the next record. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.A task representing the asynchronous operation. is set to `Default`, reads the entire row before returning the Task. For more information, including code samples, about asynchronous programming in the .NET Framework Data Provider for SQL Server, see [Asynchronous Programming](/sql/connect/ado-net/asynchronous-programming). > [!NOTE] > When reading large data (binary/text), it is recommended to use for optimal performance. ]]> Calling more than once for the same instance before task completion.SQL Server returned an error while executing the command text. The zero-based column to be retrieved.The cancellation instruction, which propagates a notification that operations should be canceled. This does not guarantee the cancellation. A setting of makes this method equivalent to . The returned task must be marked as cancelled.An asynchronous version of , which gets a value that indicates whether the column contains non-existent or missing values. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. if the specified column value is equivalent to otherwise . The connection drops or is closed during the data retrieval. The is closed during the data retrieval. There is no data ready to be read (for example, the first hasn't been called, or returned false). Trying to read a previously read column in sequential mode. There was an asynchronous operation in progress. This applies to all Get* methods when running in sequential mode, as they could be called while reading a stream.Trying to read a column that does not exist. The type of the value to be returned.The column to be retrieved.The cancellation instruction, which propagates a notification that operations should be canceled. This does not guarantee the cancellation. A setting of makes this method equivalent to . The returned task must be marked as cancelled.Asynchronously gets the value of the specified column as a type. is the synchronous version of this method.The returned type object. .| For more information, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support). ]]> The connection drops or is closed during the data retrieval. The is closed during the data retrieval. There is no data ready to be read (for example, the first hasn't been called, or returned false). Tried to read a previously-read column in sequential mode. There was an asynchronous operation in progress. This applies to all Get* methods when running in sequential mode, as they could be called while reading a stream.Trying to read a column that does not exist.The value of the column was null ( == ), retrieving a non-SQL type. doesn't match the type returned by SQL Server or cannot be cast. Starts the process of executing an async call using an SqlDataReaderAsyncCallContext derived context object. After this call the context lifetime is handled by BeginAsyncCall ContinueAsyncCall and CompleteAsyncCall AsyncCall methods Begins an async call checking for cancellation and then setting up the callback for when data is available When data has become available for an async call it is woken and this method is called. It will call the async execution func and if a Task is returned indicating more data is needed it will wait until it is called again when more is available When data has been successfully processed for an async call the async func will call this function to set the result into the task and cleanup the async state ready for another call Gets the read-only column schema collection.The read-only column schema collection). method, which enables the use of the interface to populate the schema metadata without using a . ]]> Returns buffer time allowed before access token expiry to continue using the access token. Get or set if SQLDNSCaching is supported by the server. Get or set if we need retrying with IP received from FeatureExtAck. Get or set if the control ring send redirect token and feature ext ack with true for DNSCaching Validates if federated authentication is used, Access Token used by this connection is active for the value of 'accessTokenExpirationBufferTime'. Validate the enlisted transaction state, taking into consideration the ambient transaction and transaction unbinding mode. If there is no enlisted transaction, this method is a nop. This method must be called while holding a lock on the SqlInternalConnection instance, to ensure we don't accidentally execute after the transaction has completed on a different thread, causing us to unwittingly execute in auto-commit mode. When using Explicit transaction unbinding, verify that the enlisted transaction is active and equal to the current ambient transaction. When using Implicit transaction unbinding, verify that the enlisted transaction is active. If it is not active, and the transaction object has been disposed, unbind from the transaction. If it is not active and not disposed, throw an exception. Generates (if appropriate) and sends a Federated Authentication Access token to the server, using the Federated Authentication Info. Federated Authentication Info. Tries to acquire a lock on the authentication context. If successful in acquiring the lock, gets a new token and assigns it in the out parameter. Else returns false. Federated Authentication Info Authentication Context cached in the connection pool. Out parameter, carrying the token if we acquired a lock and got the token. Get the Federated Authentication Token. Information obtained from server as Federated Authentication Info. SqlFedAuthToken used to block two scenarios if MultiSubnetFailover is true: * server-provided failover partner - raising SqlException in this case * connection string with failover partner and MultiSubnetFailover=true - raising argument one in this case with the same message gets a message for SNI error (sniError must be valid, non-zero error code) This class holds helper methods to escape Microsoft SQL Server identifiers, such as table, schema, database or other names Escapes the identifier with square brackets. The input has to be in unescaped form, like the parts received from MultipartIdentifier.ParseMultipartIdentifier. name of the identifier, in unescaped form escapes the name with [], also escapes the last close bracket with double-bracket Same as above EscapeIdentifier, except that output is written into StringBuilder Escape a string to be used inside TSQL literal, such as N'somename' or 'somename' Escape a string as a TSQL literal, wrapping it around with single quotes. Use this method to escape input strings to prevent SQL injection and to get correct behavior for embedded quotes. unescaped string escaped and quoted literal string This class holds methods invoked on System.Transactions through reflection for Global Transactions Enlists the given IPromotableSinglePhaseNotification and Non-MSDTC Promoter type into a transaction The MethodInfo instance to be invoked. Null if the method doesn't exist Sets the given DistributedTransactionIdentifier for a Transaction instance. Needs to be invoked when using a Non-MSDTC Promoter type The MethodInfo instance to be invoked. Null if the method doesn't exist Gets the Promoted Token for a Transaction The MethodInfo instance to be invoked. Null if the method doesn't exist Class encapsulating the data to be sent to the server as part of Federated Authentication Feature Extension. check the negotiated secure protocol if it's under TLS 1.2 Localized warning message The implementation of the key store provider for Windows Certificate Store. This class enables using certificates stored in the Windows Certificate Store as column master keys. For details, see Always Encrypted. To be added. The provider name.To be added. RSA_OAEP is the only algorithm supported for encrypting/decrypting column encryption keys. LocalMachine certificate store location. Valid certificate locations are LocalMachine and CurrentUser. CurrentUser certificate store location. Valid certificate locations are LocalMachine and CurrentUser. Valid certificate store Certificate path format. This is a custom format. Hashing algorithm used for signing Algorithm version The master key path.The encryption algorithm. Currently, the only valid value is: RSA_OAEP The encrypted column encryption key.Decrypts the specified encrypted value of a column encryption key. The encrypted value is expected to be encrypted using the certificate with the specified key path and using the specified algorithm. The format of the key path should be "Local Machine/My/<certificate_thumbprint>" or "Current User/My/<certificate_thumbprint>". Returns . The decrypted column encryption key.To be added. The master key path.The encryption algorithm. Currently, the only valid value is: RSA_OAEP The plaintext column encryption key.Encrypts a column encryption key using the certificate with the specified key path and using the specified algorithm. The format of the key path should be "Local Machine/My/<certificate_thumbprint>" or "Current User/My/<certificate_thumbprint>". Returns . The encrypted column encryption key.To be added. The column master key path. to indicate that the column master key supports enclave computations; otherwise, .Digitally signs the column master key metadata with the column master key referenced by the parameter.The signature of the column master key metadata.To be added. The complete path of an asymmetric key. The path format is specific to a key store provider.A Boolean that indicates if this key can be sent to the trusted enclave.The master key metadata siognature.This function must be implemented by the corresponding Key Store providers. This function should use an asymmetric key identified by a key path and verify the masterkey metadata consisting of (masterKeyPath, allowEnclaveComputations, providerName).A Boolean value that indicates if the master key metadata can be verified based on the provided signature.To be added. This function validates that the encryption algorithm is RSA_OAEP and if it is not, then throws an exception Asymmetric key encryption algorithm Certificate path length has to fit in two bytes, so check its value against Int16.MaxValue Gets a string array containing Valid certificate locations. Checks if the certificate path is Empty or Null (and raises exception if they are). Parses the given certificate path, searches in certificate store and returns a matching certificate Certificate key path. Format of the path is [LocalMachine|CurrentUser]/[storename]/thumbprint Returns the certificate identified by the certificate path Searches for a certificate in certificate store and returns the matching certificate Store Location: This can be one of LocalMachine or UserName Store Location: Currently this can only be My store. Certificate thumbprint Matching certificate Encrypt the text using specified certificate. Text to encrypt. Certificate object. Returns an encrypted blob or throws an exception if there are any errors. Decrypt the data using specified certificate. Text to decrypt. Certificate object. Returns a decrypted blob or throws an exception if there are any errors. Generates signature based on RSA PKCS#v1.5 scheme using a specified certificate. Text to sign. Certificate object. Signature Verifies the given RSA PKCSv1.5 signature. true if signature is valid, false if it is not valid The CMK Store provider implementation for using the Microsoft Cryptography API: Next Generation (CNG) with Always Encrypted. A constant string for the provider name 'MSSQL_CNG_STORE'.To be added. RSA_OAEP is the only algorithm supported for encrypting/decrypting column encryption keys using this provider. For now, we are keeping all the providers in sync. Algorithm version The master key path.The encryption algorithm.The encrypted column encryption key.Decrypts the given encrypted value using an asymmetric key specified by the key path and the specified algorithm. The key path will be in the format of [ProviderName]/KeyIdentifier and should be an asymmetric key stored in the specified CNG key store provider. The valid algorithm used to encrypt/decrypt the CEK is 'RSA_OAEP'. The decrypted column encryption key.To be added. The master key path.The encryption algorithm.The plaintext column encryption key.Encrypts the given plain text column encryption key using an asymmetric key specified by the key path and the specified algorithm. The key path will be in the format of [ProviderName]/KeyIdentifier and should be an asymmetric key stored in the specified CNG key store provider. The valid algorithm used to encrypt/decrypt the CEK is 'RSA_OAEP'.The encrypted column encryption key.To be added. The column master key path. The path format is specific to a key store provider. to indicate that the column master key supports enclave computations; otherwise, .Throws a exception in all cases.The signature of the column master key metadata. method must be implemented by the corresponding key store providers. should use an asymmetric key identified by a key path and sign the masterkey metadata consisting of `masterKeyPath`, `allowEnclaveComputations`, and providerName. ]]> The complete path of an asymmetric key. The path format is specific to a key store provider.A Boolean that indicates if this key can be sent to the trusted enclave.The master key metadata signature.This function must be implemented by the corresponding Key Store providers. This function should use an asymmetric key identified by a key path and verify the masterkey metadata consisting of (masterKeyPath, allowEnclaveComputations, providerName).A Boolean that indicates if the master key metadata can be verified based on the provided signature.To be added. This function validates that the encryption algorithm is RSA_OAEP and if it is not, then throws an exception Asymmetric key encryptio algorithm Indicates if ADO.NET calls or the customer calls the API Checks if the CNG key path is Empty or Null (and raises exception if they are). keypath containing the CNG provider name and key name Indicates if ADO.NET calls or the customer calls the API Encrypt the text using specified CNG key. RSA CNG Provider. Plain text Column Encryption Key. Returns an encrypted blob or throws an exception if there are any errors. Decrypt the text using the specified CNG key. RSA CNG Provider. Encrypted Column Encryption Key. Returns the decrypted plaintext Column Encryption Key or throws an exception if there are any errors. Generates signature based on RSA PKCS#v1.5 scheme using a specified CNG Key. Text to sign. RSA CNG Provider. Signature Verifies the given RSA PKCSv1.5 signature. RSA CNG Provider. true if signature is valid, false if it is not valid Gets the public Key size in bytes RSA CNG Provider. Key size in bytes Creates a RSACng object from the given keyName Indicates if ADO.NET calls or the customer calls the API Extracts the CNG provider and key name from the key path keypath in the format [CNG Provider]/[KeyName] Indicates if ADO.NET calls or the customer calls the API CNG Provider Key identifier inside the CNG provider The CMK Store provider implementation for using Microsoft CAPI based Cryptographic Service Providers (CSP) with Always Encrypted. A constant string for the provider name 'MSSQL_CSP_PROVIDER'.To be added. RSA_OAEP is the only algorithm supported for encrypting/decrypting column encryption keys using this provider. For now, we are keeping all the providers in sync. Hashing algorithm used for signing Algorithm version The master key path.The encryption algorithm.The encrypted column encryption key.Decrypts the given encrypted value using an asymmetric key specified by the key path and algorithm. The key path will be in the format of [ProviderName]/KeyIdentifier and should be an asymmetric key stored in the specified CSP provider. The valid algorithm used to encrypt/decrypt the CEK is 'RSA_OAEP'.The decrypted column encryption key.To be added. The master key path.The encryption algorithm.The plaintext column encryption key.Encrypts the given plain text column encryption key using an asymmetric key specified by the key path and the specified algorithm. The key path will be in the format of [ProviderName]/KeyIdentifier and should be an asymmetric key stored in the specified CSP provider. The valid algorithm used to encrypt/decrypt the CEK is 'RSA_OAEP'.The encrypted column encryption key.To be added. The column master key path. The path format is specific to a key store provider. to indicate that the column master key supports enclave computations; otherwise, .Throws a exception in all cases.The signature of the column master key metadata. method must be implemented by the corresponding key store providers. should use an asymmetric key identified by a key path and sign the masterkey metadata consisting of `masterKeyPath`, `allowEnclaveComputations`, and providerName. ]]> The complete path of an asymmetric key. The path format is specific to a key store provider.A boolean that indicates if this key can be sent to the trusted enclave.Master key metadata signature.This function must be implemented by the corresponding Key Store providers. This function should use an asymmetric key identified by a key path and sign the masterkey metadata consisting of (masterKeyPath, allowEnclaveComputations, providerName).A Boolean that indicates if the master key metadata can be verified based on the provided signature.To be added. This function validates that the encryption algorithm is RSA_OAEP and if it is not, then throws an exception Asymmetric key encryption algorithm Indicates if ADO.NET calls or the customer calls the API Checks if the CSP key path is Empty or Null (and raises exception if they are). CSP key path. Indicates if ADO.NET calls or the customer calls the API Encrypt the text using specified CSP key. RSACryptoServiceProvider Plain text Column Encryption Key. Returns an encrypted blob or throws an exception if there are any errors. Decrypt the text using specified CSP key. RSACryptoServiceProvider Encrypted Column Encryption Key. Returns the decrypted plaintext Column Encryption Key or throws an exception if there are any errors. Generates signature based on RSA PKCS#v1.5 scheme using a specified CSP Key URL. Text to sign. RSA Provider with a given key Signature Verifies the given RSA PKCSv1.5 signature. RSA Provider with a given key true if signature is valid, false if it is not valid Gets the public Key size in bytes RSA Provider with a given key Key size in bytes Creates a RSACryptoServiceProvider from the given key path which contains both CSP name and key name key path in the format of [CAPI provider name]/[key name] Indicates if ADO.NET calls or the customer calls the API Extracts the CSP provider name and key name from the given key path key path in the format of [CSP provider name]/[key name] Indicates if ADO.NET calls or the customer calls the API output containing the CSP provider name output containing the key name Gets the provider type from a given CAPI provider name CAPI provider name key path in the format of [CSP provider name]/[key name] Indicates if ADO.NET calls or the customer calls the API Verify client encryption possibility. Verify client encryption possibility. This exception is thrown when an ongoing operation is aborted by the user. event sets the **Abort** property to `true` in the object passed to the handler, the method stops sending rows to the server and throws an . ]]> Represents the context of an authentication attempt when using the new active directory based authentication mechanisms. All data members, except_isUpdateInProgressCounter, should be immutable. The value expected in _isUpdateInProgress if a thread has taken a lock on this context, to perform the update on the context. The value expected in _isUpdateInProgress if no thread has taken a lock on this context. Access Token, which is obtained from Active Directory Authentication Library for SQL Server, and needs to be sent to SQL Server as part of TDS Token type Federated Authentication Token. Expiration time of the above access token. A member which is used to achieve a lock to control refresh attempt on this context. Constructor. Access Token that will be used to connect to SQL Server. Carries identity information about a user. The expiration time in UTC for the above accessToken. Static Method. Given two contexts, choose one to update in the cache. Chooses based on expiration time. Context1 Context2 Try locking the variable _isUpdateInProgressCounter and return if this thread got the lock to update. Whichever thread got the chance to update this variable to 1 wins the lock. Release the lock which was obtained through LockToUpdate. Represents the key of dbConnectionPoolAuthenticationContext. All data members should be immutable and so, hashCode is pre-computed. Security Token Service Authority. Service Principal Name. Pre-Computed Hash Code. Constructor for the type. Token Endpoint URL SPN representing the SQL service in an active directory. Override the default Equals implementation. Override the default GetHashCode implementation. Compute the hash code for this object. Ensure that this connection cannot be put back into the pool. The default implementation is for the open connection objects, and it simply throws. Our private closed-state connection objects override this and do the correct thing. When overridden in a derived class, will check if the underlying connection is still actually alive If true an exception will be thrown if the connection is dead instead of returning true\false (this allows the caller to have the real reason that the connection is not alive (e.g. network error, etc)) True if the connection is still alive, otherwise false (If not overridden, then always true) Get boolean value that indicates whether the enlisted transaction has been disposed. True if there is an enlisted transaction, and it has been disposed. False if there is an enlisted transaction that has not been disposed, or if the transaction reference is null. This method must be called while holding a lock on the DbConnectionInternal instance. The private member which carries the set of authenticationcontexts for this pool (based on the user's identity). Return the pooled authentication contexts. Creates a new connection to replace an existing connection Outer connection that currently owns Options used to create the new connection Inner connection that will be replaced A new inner connection that is attached to the Provides a mechanism for enumerating all available instances of SQL Server within the local network. class exposes this information to the application developer, providing a containing information about all the available servers. This returned table contains a list of server instances that matches the list provided when a user attempts to create a new connection, and on the `Connection Properties` dialog box, expands the drop-down list containing all the available servers. ]]> Enumerating Instances of SQL Server Provides a mechanism for enumerating all available instances of SQL Server within the local network. class exposes this information to the application developer, providing a containing information about all the available servers. This returned table contains a list of server instances that matches the list provided when a user attempts to create a new connection, and on the `Connection Properties` dialog box, expands the drop-down list containing all the available servers. ]]> Enumerating Instances of SQL Server Gets an instance of the , which can be used to retrieve information about available SQL Server instances.An instance of the used to retrieve information about available SQL Server instances. class does not provide a constructor. Use the property to retrieve an instance of the class instead. [!code-csharp[SqlDataSourceEnumeratorExample#1](~/../sqlclient/doc/samples/SqlDataSourceEnumeratorExample.cs#1)] ## Examples The following console application displays a list of all the available SQL Server 2005 instances within the local network. This code uses the method to filter the rows in the table returned by the method. [!code-csharp[SqlDataSourceEnumeratorVersionExample#1](~/../sqlclient/doc/samples/SqlDataSourceEnumeratorVersionExample.cs#1)] ]]> Enumerating Instances of SQL Server Retrieves a containing information about all visible SQL Server instances.A containing information about the visible SQL Server instances.
10.0.xx for SQL Server 2008
10.50.x for SQL Server 2008 R2
11.0.xx for SQL Server 2012
12.0.xx for SQL Server 2014
13.0.xx for SQL Server 2016
14.0.xx for SQL Server 2017| > [!NOTE] > Due to the nature of the mechanism used by to locate data sources on a network, the method will not always return a complete list of the available servers, and the list might not be the same on every call. If you plan to use this function to let users select a server from a list, make sure that you always also supply an option to type in a name that is not in the list, in case the server enumeration does not return all the available servers. In addition, this method may take a significant amount of time to execute, so be careful about calling it when performance is critical. ## Examples The following console application retrieves information about all the visible SQL Server instances and displays the information in the console window. [!code-csharp[SqlDataSourceEnumerator.Example#1](~/../sqlclient/doc/samples/SqlDataSourceEnumeratorExample.cs#1)] ]]>
Enumerating Instances of SQL Server
const values for SqlDataSourceEnumerator Sets all columns read-only. Represents a request for notification for a given command. class provides a simpler way of using query notifications. However, if you need fine control over when notifications occur, or you need to customize the message data returned as part of a notification, the class is the one to use. ]]> Using Query Notifications Creates a new instance of the class with default values. object, that instance must have its and properties initialized before assigning the object to a object's property. The default values used by the constructor are NULL (`Nothing` in Visual Basic) for the , an empty string for the , and zero for the . ]]> Using Query Notifications A string that contains an application-specific identifier for this notification. It is not used by the notifications infrastructure, but it allows you to associate notifications with the application state. The value indicated in this parameter is included in the Service Broker queue message.A string that contains the Service Broker service name where notification messages are posted, and it must include a database name or a Service Broker instance GUID that restricts the scope of the service name lookup to a particular database. For more information about the format of the parameter, see .The time, in seconds, to wait for a notification message.Creates a new instance of the class with a user-defined string that identifies a particular notification request, the name of a predefined SQL Server 2005 Service Broker service name, and the time-out period, measured in seconds. instance, providing your own identifier, the SQL Server 2005 Service Broker service name, and a time-out value. ]]> The value of the parameter is NULL.The or parameter is longer than or the value in the parameter is less than zero.Using Query Notifications Gets or sets the SQL Server Service Broker service name where notification messages are posted. that contains the SQL Server 2005 Service Broker service name where notification messages are posted and the database or service broker instance GUID to scope the server name lookup. property has the following format: `service={;(local database=|broker instance=)}` For example, if you use the service "myservice" in the database "AdventureWorks" the format is: `service=myservice;local database=AdventureWorks` The SQL Server Service Broker service must be previously configured on the server. In addition, a Service Broker service and queue must be defined and security access granted as needed. See the SQL Server 2005 documentation for more information. ]]> The value is NULL.The value is longer than .Using Query Notifications Gets or sets a value that specifies how long SQL Server waits for a change to occur before the operation times out.A signed integer value that specifies, in seconds, how long SQL Server waits for a change to occur before the operation times out. property defaults to the value set on the server. ]]> The value is less than zero.Using Query Notifications Gets or sets an application-specific identifier for this notification.A value of the application-specific identifier for this notification. property is included in the SQL Server 2005 queue message. ]]> The value is longer than .Using Query Notifications Provides a mechanism for enumerating all available instances of SQL Server within the local network Retrieves a DataTable containing information about all visible SQL Server instances This type provides workarounds for the separation between System.Data.Common and Microsoft.Data.SqlClient. The latter wants to access internal members of the former, and this class provides ways to do that. We must review and update this implementation any time the implementation of the corresponding types in System.Data.Common change. This type provides workarounds for the separation between System.Data.Common and Microsoft.Data.SqlClient. The latter wants to access internal members of the former, and this class provides ways to do that. We must review and update this implementation any time the implementation of the corresponding types in System.Data.Common change. Constructs a SqlMoney from a long value without scaling. The ignored parameter exists only to distinguish this constructor from the constructor that takes a long. Used only internally. Exposes SQL Server data that is stored with the FILESTREAM column attribute as a sequence of bytes. class is used to work with `varbinary(max)` data stored with the FILESTREAM attribute in a SQL Server 2008 database. You must install the .NET Framework 3.5 SP1 (or later) to use to work with FILESTREAM data. Specifying the FILESTREAM attribute on a `varbinary(max)` column causes SQL Server to store the data in the local NTFS file system instead of in the database file. Transact-SQL statements provide data manipulation capabilities within the server, and Win32 file system interfaces provide streaming access to the data. > [!NOTE] > Individual files stored in a FILESTREAM column cannot be opened directly from the NTFS file system. Streaming FILESTREAM data works only in the context of a SQL Server transaction. The class is derived from the class, which represents an abstraction of a sequence of bytes from some arbitrary data source such as a file or a block of memory. You can read from a FILESTREAM by transferring data from a stream into a data structure such as an array of bytes. You can write to a FILESTREAM by transferring the data from a data structure into a stream. You can also seek within the stream, which allows you to query and modify data at the current position within the stream. For conceptual documentation and code examples, see [FILESTREAM Data](/sql/connect/ado-net/sql/filestream-data). For documentation about setting up and configuring FILESTREAM data on SQL Server, see [Designing and Implementing FILESTREAM Storage](https://go.microsoft.com/fwlink/?LinkId=121499) in SQL Server 2008 Books Online. ]]> FILESTREAM Data in SQL Server 2008 (ADO.NET)SQL Server Data Type Mappings (ADO.NET)SQL Server Binary and Large-Value Data (ADO.NET) The logical path to the file. The path can be retrieved by using the Transact-SQL Pathname function on the underlying FILESTREAM column in the table.The transaction context for the object. Applications should return the byte array returned by calling the GET_FILESTREAM_TRANSACTION_CONTEXT method.The access mode to use when opening the file. Supported enumeration values are , , and . When using , the object can be used to read all of the existing data. When using , points to a zero byte file. Existing data will be overwritten when the object is closed and the transaction is committed. When using , the points to a file which has all the existing data in it. The handle is positioned at the beginning of the file. You can use one of the methods to move the handle position within the file to write or append new data.Initializes a new instance of the class. | |Write|| |ReadWrite| and | For more information about CAS, see [Code Access Security and ADO.NET](/dotnet/framework/data/adonet/code-access-security). If an exception is thrown, any open transactions should be rolled back. Otherwise, data loss can occur. ]]> is a null reference, or is null. is an empty string (""), contains only white space, or contains one or more invalid characters. begins with "\\\\.\\", for example "\\\\.\PHYSICALDRIVE0 ". The handle returned by the call to NTCreateFile is not of type FILE_TYPE_DISK. contains an unsupported value.The file cannot be found.An I/O error occurred.The caller does not have the required permission.The specified is invalid, such as being on an unmapped drive.The access requested is not permitted by the operating system for the specified path. This occurs when Write or ReadWrite access is specified, and the file or directory is set for read-only access.NtCreateFile fails with error code set to ERROR_SHARING_VIOLATION.FILESTREAM Data in SQL Server 2008 (ADO.NET) The logical path to the file. The path can be retrieved by using the Transact-SQL Pathname function on the underlying FILESTREAM column in the table.The transaction context for the object. When set to null, an implicit transaction will be used for the object. Applications should return the byte array returned by calling the GET_FILESTREAM_TRANSACTION_CONTEXT method.The access mode to use when opening the file. Supported enumeration values are , , and . When using , the object can be used to read all of the existing data. When using , points to a zero byte file. Existing data will be overwritten when the object is closed and the transaction is committed. When using , the points to a file which has all the existing data in it. The handle is positioned at the beginning of the file. You can use one of the methods to move the handle position within the file to write or append new data.Specifies the option to use while opening the file. Supported values are , , , and .The allocation size to use while creating a file. If set to 0, the default value is used.Initializes a new instance of the class. | |Write|| |ReadWrite| and | For more information about CAS, see [Code Access Security and ADO.NET](/dotnet/framework/data/adonet/code-access-security). If an exception is thrown, any open transactions should be rolled back. Otherwise, data loss can occur. ]]> is a null reference, or is null. is an empty string (""), contains only white space, or contains one or more invalid characters. begins with "\\\\.\\", for example "\\\\.\PHYSICALDRIVE0 " The handle returned by call to NTCreateFile is not of type FILE_TYPE_DISK. contains an unsupported value.The file cannot be found.An I/O error occurred.The caller does not have the required permission.The specified is invalid, such as being on an unmapped drive.The access requested is not permitted by the operating system for the specified path. This occurs when Write or ReadWrite access is specified, and the file or directory is set for read-only access.NtCreateFile fails with error code set to ERROR_SHARING_VIOLATION.FILESTREAM Data in SQL Server 2008 (ADO.NET) Destructor of the SqlFileStream class object.To be added. to release managed and unmanaged resources; to release only unmanaged resources.Releases the unmanaged resources used and optionally releases the managed resources. . ]]> Gets the logical path of the passed to the constructor.A string value indicating the name of the .To be added.FILESTREAM Data in SQL Server 2008 (ADO.NET) Gets or sets the transaction context for this object.The array that was passed to the constructor for this object.To be added.FILESTREAM Data in SQL Server 2008 (ADO.NET) Gets a value indicating whether the current stream supports reading. if the current stream supports reading; otherwise, .To be added.FILESTREAM Data in SQL Server 2008 (ADO.NET) Gets a value indicating whether the current stream supports seeking. if the current stream supports seeking; otherwise, .To be added.FILESTREAM Data in SQL Server 2008 (ADO.NET) Gets a value indicating whether the current stream can time out. if the current stream can time out; otherwise, .To be added. Gets a value indicating whether the current stream supports writing. if the current stream supports writing; otherwise, .To be added.FILESTREAM Data in SQL Server 2008 (ADO.NET) Gets a value indicating the length of the current stream in bytes.An indicating the length of the current stream in bytes.To be added.FILESTREAM Data in SQL Server 2008 (ADO.NET) Gets or sets the position within the current stream.The current position within the .To be added.FILESTREAM Data in SQL Server 2008 (ADO.NET) Gets or sets a value, in milliseconds, that determines how long the stream will attempt to read before timing out.A value, in milliseconds, that determines how long the stream will attempt to read before timing out.To be added.FILESTREAM Data in SQL Server 2008 (ADO.NET) Gets or sets a value, in milliseconds, that determines how long the stream will attempt to write before timing out.A value, in milliseconds, that determines how long the stream will attempt to write before timing out.To be added.FILESTREAM Data in SQL Server 2008 (ADO.NET) Clears all buffers for this stream and causes any buffered data to be written to the underlying device.To be added.FILESTREAM Data in SQL Server 2008 (ADO.NET) The buffer to read the data into.The byte offset in at which to begin writing data read from the stream.The maximum number of bytes to read.An optional asynchronous callback, to be called when the read is complete.A user-provided object that distinguishes this particular asynchronous read request from other requestsBegins an asynchronous read operation.An that represents the asynchronous read, which could still be pending. property to determine whether the current instance supports reading. ]]> Reading data is not supported on the stream.FILESTREAM Data in SQL Server 2008 (ADO.NET) The reference to the pending asynchronous request to finish.Waits for the pending asynchronous read to complete.The number of bytes read from the stream, between zero (0) and the number of bytes you requested. Streams return zero (0) only at the end of the stream, otherwise, they should block until at least one byte is available.To be added.The object did not come from the corresponding method.FILESTREAM Data in SQL Server 2008 (ADO.NET) The buffer to write data from.The byte offset in from which to begin writing.The maximum number of bytes to write.An optional asynchronous callback, to be called when the write is complete.A user-provided object that distinguishes this particular asynchronous write request from other requests.Begins an asynchronous write operation.An that represents the asynchronous write, which could still be pending. property to determine whether the current instance supports writing. ]]> Writing data is not supported on the stream.FILESTREAM Data in SQL Server 2008 (ADO.NET) A reference to the outstanding asynchronous I/O request.Ends an asynchronous write operation.To be added.The object did not come from the corresponding method.FILESTREAM Data in SQL Server 2008 (ADO.NET) A byte offset relative to the parameterA value of type indicating the reference point used to obtain the new positionSets the position within the current stream.The new position within the current stream.To be added.FILESTREAM Data in SQL Server 2008 (ADO.NET) The desired length of the current stream in bytes.Sets the length of the current stream. property to determine whether the current instance supports reading. ]]> The object does not support reading of data.FILESTREAM Data in SQL Server 2008 (ADO.NET) An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.The zero-based byte offset in buffer at which to begin storing the data read from the current stream.The maximum number of bytes to be read from the current stream.Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. property to determine whether the current instance supports writing. ]]> The object does not support reading of data.FILESTREAM Data in SQL Server 2008 (ADO.NET) Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.The unsigned byte cast to an , or -1 if at the end of the stream. property to determine whether the current instance supports reading. ]]> The object does not support reading of data.FILESTREAM Data in SQL Server 2008 (ADO.NET) An array of bytes. This method copies bytes from to the current stream.The zero-based byte offset in at which to begin copying bytes to the current stream.The number of bytes to be written to the current stream.Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. property to determine whether the current instance supports writing. ]]> The object does not support writing of data.FILESTREAM Data in SQL Server 2008 (ADO.NET) The byte to write to the stream.Writes a byte to the current position in the stream and advances the position within the stream by one byte. property to determine whether the current instance supports writing. ]]> The object does not support writing of data.FILESTREAM Data in SQL Server 2008 (ADO.NET) Constructs a new sys description. description text. Retrieves the description text. description A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Connection timed out while retrieving an access token using '{0}' authentication method. Last error: {1}: {2}. Looks up a localized string similar to Data adapter mapping error.. Looks up a localized string similar to Ascending. Looks up a localized string similar to Specified parameter name '{0}' is not valid.. Looks up a localized string similar to The method '{0}' cannot be called more than once for the same execution.. Looks up a localized string similar to Invalid operation. The connection is closed.. Looks up a localized string similar to Invalid index {0} for this {1} with Count={2}.. Looks up a localized string similar to A {0} with {1} '{2}' is not contained by this {3}.. Looks up a localized string similar to The {0} only accepts non-null {1} type objects, not {2} objects.. Looks up a localized string similar to The {0} is already contained by another {1}.. Looks up a localized string similar to The {0} with is already contained by this {1}.. Looks up a localized string similar to The {0} only accepts non-null {1} type objects.. Looks up a localized string similar to Attempted to remove an {0} that is not contained by this {1}.. Looks up a localized string similar to The {0}.{1} is required to be unique, '{2}' already exists in the collection.. Looks up a localized string similar to The column mapping from SourceColumn '{0}' failed because the DataColumn '{1}' is a computed column.. Looks up a localized string similar to Inconvertible type mismatch between SourceColumn '{0}' of {1} and the DataColumn '{2}' of {3}.. Looks up a localized string similar to Missing the DataColumn '{0}' for the SourceColumn '{2}'.. Looks up a localized string similar to Missing the DataColumn '{0}' in the DataTable '{1}' for the SourceColumn '{2}'.. Looks up a localized string similar to {0}: CommandText property has not been initialized. Looks up a localized string similar to Unable to retrieve the ComputerNameDnsFullyQualified, {0}.. Looks up a localized string similar to Update requires a connection.. Looks up a localized string similar to The connection was not closed. {0}. Looks up a localized string similar to The connection has been disabled.. Looks up a localized string similar to {0}: Connection property has not been initialized.. Looks up a localized string similar to Update requires a connection object. The Connection property has not been initialized.. Looks up a localized string similar to Update requires the command clone to have a connection object. The Connection property of the command clone has not been initialized.. Looks up a localized string similar to Update requires the DeleteCommand to have a connection object. The Connection property of the DeleteCommand has not been initialized.. Looks up a localized string similar to Fill: SelectCommand.Connection property has not been initialized.. Looks up a localized string similar to FillPage: SelectCommand.Connection property has not been initialized.. Looks up a localized string similar to FillSchema: SelectCommand.Connection property has not been initialized.. Looks up a localized string similar to Update requires the InsertCommand to have a connection object. The Connection property of the InsertCommand has not been initialized.. Looks up a localized string similar to Update requires the UpdateCommand to have a connection object. The Connection property of the UpdateCommand has not been initialized.. Looks up a localized string similar to The connection's current state: {0}.. Looks up a localized string similar to The connection's current state is closed.. Looks up a localized string similar to The connection's current state is connecting.. Looks up a localized string similar to The connection's current state is open.. Looks up a localized string similar to The connection's current state is executing.. Looks up a localized string similar to The connection's current state is fetching.. Looks up a localized string similar to Format of the initialization string does not conform to specification starting at index {0}.. Looks up a localized string similar to Data adapter error.. Looks up a localized string similar to The argument is too long.. Looks up a localized string similar to Invalid attempt to call {0} when reader is closed.. Looks up a localized string similar to No data exists for the row/column.. Looks up a localized string similar to DB concurrency violation.. Looks up a localized string similar to '{0}' cannot be called when the DbDataRecord is read only.. Looks up a localized string similar to '{0}' cannot be called when the record is read only.. Looks up a localized string similar to No mapping exists from DbType {0} to a known {1}.. Looks up a localized string similar to Cannot enlist in the transaction because the connection is the primary connection for a delegated or promoted transaction.. Looks up a localized string similar to {0} DeriveParameters only supports CommandType.StoredProcedure, not CommandType.{1}.. Looks up a localized string similar to Descending. Looks up a localized string similar to The acceptable values for the property '{0}' are '{1}' or '{2}'.. Looks up a localized string similar to Dynamic SQL generation is not supported against multiple base tables.. Looks up a localized string similar to Dynamic SQL generation not supported against table names '{0}' that contain the QuotePrefix or QuoteSuffix character '{1}'.. Looks up a localized string similar to Dynamic SQL generation for the DeleteCommand is not supported against a SelectCommand that does not return any key column information.. Looks up a localized string similar to Dynamic SQL generation for the DeleteCommand is not supported against a SelectCommand that does not contain a row version column.. Looks up a localized string similar to Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not contain a row version column.. Looks up a localized string similar to Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.. Looks up a localized string similar to Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information.. Looks up a localized string similar to Expecting non-empty array for '{0}' parameter.. Looks up a localized string similar to Database cannot be null, the empty string, or string of only whitespace.. Looks up a localized string similar to Expecting non-empty string for '{0}' parameter.. Looks up a localized string similar to '{0}':The length of the literal value must be even.. Looks up a localized string similar to Hierarchical chapter columns must map to an AutoIncrement DataColumn.. Looks up a localized string similar to Fill: expected a non-empty string for the SourceTable name.. Looks up a localized string similar to FillSchema: expected a non-empty string for the SourceTable name.. Looks up a localized string similar to '{0}':The literal value must be a string with hexadecimal digits. Looks up a localized string similar to Incorrect async result.. Looks up a localized string similar to Internal DbConnection Error: {0}. Looks up a localized string similar to Internal .NET Framework Data Provider error {0}.. Looks up a localized string similar to The length of argument '{0}' exceeds its limit of '{1}'.. Looks up a localized string similar to Invalid argument value for method '{0}'.. Looks up a localized string similar to Buffer offset '{1}' plus the bytes available '{0}' is greater than the length of the passed in buffer.. Looks up a localized string similar to Invalid CommandTimeout value {0}; the value must be >= 0.. Looks up a localized string similar to Invalid value for key '{0}'.. Looks up a localized string similar to The value's length for key '{0}' exceeds its limit of '{1}'.. Looks up a localized string similar to Invalid 'Connect Timeout' value which must be an integer >= 0.. Looks up a localized string similar to The DataDirectory substitute is not a string.. Looks up a localized string similar to Data length '{0}' is less than 0.. Looks up a localized string similar to Specified length '{0}' is out of range.. Looks up a localized string similar to The parameter data type of {0} is invalid.. Looks up a localized string similar to Data type '{0}' can not be formatted as a literal because it has an invalid date time digits.. Looks up a localized string similar to Invalid destination buffer (size of {0}) offset: {1}. Looks up a localized string similar to The {0} enumeration value, {1}, is invalid.. Looks up a localized string similar to The value can not be formatted as a literal of the requested type.. Looks up a localized string similar to Implicit conversion of object type '{0}' to data type '{1}' is not supported.. Looks up a localized string similar to Invalid keyword, contain one or more of 'no characters', 'control characters', 'leading or trailing whitespace' or 'leading semicolons'.. Looks up a localized string similar to Data type '{0}' can not be formatted as a literal because it has an invalid maximum scale.. Looks up a localized string similar to The MaxRecords value of {0} is invalid; the value must be >= 0.. Looks up a localized string similar to Invalid value for this metadata.. Looks up a localized string similar to Invalid min or max pool size values, min pool size cannot be greater than the max pool size.. Looks up a localized string similar to Cannot set the AccessToken property if 'Authentication' has been specified in the connection string.. Looks up a localized string similar to Cannot set the AccessToken property with the 'Context Connection' keyword.. Looks up a localized string similar to Cannot set the AccessToken property if the Credential property is already set.. Looks up a localized string similar to Cannot set the AccessToken property if the 'Integrated Security' connection string keyword has been set to 'true' or 'SSPI'.. Looks up a localized string similar to Cannot set the AccessToken property if the AccessTokenCallback has been set.. Looks up a localized string similar to Cannot set the AccessToken property if 'UserID', 'UID', 'Password', or 'PWD' has been specified in connection string.. Looks up a localized string similar to Cannot set the AccessTokenCallback property if the 'Integrated Security' connection string keyword has been set to 'true' or 'SSPI'.. Looks up a localized string similar to Cannot set the AccessTokenCallback property if 'Authentication=Active Directory Default' has been specified in the connection string.. Looks up a localized string similar to Cannot set the Credential property if the AccessToken property is already set.. Looks up a localized string similar to Cannot use Credential with UserID, UID, Password, or PWD connection string keywords.. Looks up a localized string similar to Cannot use Credential with Context Connection keyword.. Looks up a localized string similar to Cannot use Credential with Integrated Security connection string keyword.. Looks up a localized string similar to {0} "{1}".. Looks up a localized string similar to {0} "{1}", incorrect usage of quotes.. Looks up a localized string similar to {0} "{1}", the current limit of "{2}" is insufficient.. Looks up a localized string similar to Invalid parameter Offset value '{0}'. The value must be greater than or equal to 0.. Looks up a localized string similar to Specified QuotePrefix and QuoteSuffix values do not match.. Looks up a localized string similar to Specified SeekOrigin value is invalid.. Looks up a localized string similar to Invalid parameter Size value '{0}'. The value must be greater than or equal to 0.. Looks up a localized string similar to Invalid source buffer (size of {0}) offset: {1}. Looks up a localized string similar to SourceColumn is required to be a non-empty string.. Looks up a localized string similar to SourceTable is required to be a non-empty string. Looks up a localized string similar to The StartRecord value of {0} is invalid; the value must be >= 0.. Looks up a localized string similar to Invalid UDL file.. Looks up a localized string similar to The value contains embedded nulls (\u0000).. Looks up a localized string similar to Invalid Xml; can only parse elements of version one.. Looks up a localized string similar to Keyword not supported: '{0}'.. Looks up a localized string similar to The literal value provided is not a valid literal for the data type '{0}'.. Looks up a localized string similar to Cannot enlist in the transaction because a local transaction is in progress on the connection. Finish local transaction and retry.. Looks up a localized string similar to Mismatched end method call for asyncResult. Expected call to {0} but {1} was called instead.. Looks up a localized string similar to Missing SourceColumn mapping for '{0}'.. Looks up a localized string similar to Use of key '{0}' requires the key '{1}' to be present.. Looks up a localized string similar to DataReader.GetFieldType({0}) returned null.. Looks up a localized string similar to The SelectCommand property has not been initialized before calling '{0}'.. Looks up a localized string similar to The DataAdapter.SelectCommand property needs to be initialized.. Looks up a localized string similar to The DataAdapter.SelectCommand.Connection property needs to be initialized;. Looks up a localized string similar to Missing SourceTable mapping: '{0}'. Looks up a localized string similar to Missing TableMapping when TableMapping.DataSetTable='{0}'.. Looks up a localized string similar to Missing the '{0}' DataTable for the '{1}' SourceTable.. Looks up a localized string similar to Multiple return value parameters are not supported.. Looks up a localized string similar to {0} must be marked as read only.. Looks up a localized string similar to Invalid value for argument '{0}'. The value must be greater than or equal to 0.. Looks up a localized string similar to The ConnectionString property has not been initialized.. Looks up a localized string similar to A Non CLS Exception was caught.. Looks up a localized string similar to Timeout attempting to open the connection. The time period elapsed prior to attempting to open the connection has been exceeded. This may have occurred because of too many simultaneous non-pooled connection attempts.. Looks up a localized string similar to Invalid {2} attempt at dataIndex '{0}'. With CommandBehavior.SequentialAccess, you may only read from dataIndex '{1}' or greater.. Looks up a localized string similar to Invalid attempt to read from column ordinal '{0}'. With CommandBehavior.SequentialAccess, you may only read from column ordinal '{1}' or greater.. Looks up a localized string similar to The QuotePrefix and QuoteSuffix properties cannot be changed once an Insert, Update, or Delete command has been generated.. Looks up a localized string similar to The stored procedure '{0}' doesn't exist.. Looks up a localized string similar to Given security element is not a permission element.. Looks up a localized string similar to Metadata must be SqlDbType.Row. Looks up a localized string similar to The {0} enumeration value, {1}, is not supported by the {2} method.. Looks up a localized string similar to Unexpected null DataSet argument.. Looks up a localized string similar to Unexpected null DataTable argument. Looks up a localized string similar to The numerical value is too large to fit into a 96 bit decimal.. Looks up a localized string similar to The '{0}' keyword is obsolete. Use '{1}' instead.. Looks up a localized string similar to The ODBC provider did not return results from SQLGETTYPEINFO.. Looks up a localized string similar to Offset must refer to a location within the value.. Looks up a localized string similar to Only specify one item in the dataTables array when using non-zero values for startRecords or maxRecords.. Looks up a localized string similar to Not allowed to change the '{0}' property. {1}. Looks up a localized string similar to {0} requires an open and available Connection. {1}. Looks up a localized string similar to Update requires the updating command to have an open connection object. {1}. Looks up a localized string similar to Update requires the {0}Command to have an open connection object. {1}. Looks up a localized string similar to Update requires the {0}Command to have an open connection object. {1}. Looks up a localized string similar to Update requires the {0}Command to have an open connection object. {1}. Looks up a localized string similar to There is already an open DataReader associated with this {0} which must be closed first.. Looks up a localized string similar to There is already an open SqlResultSet associated with this command which must be closed first.. Looks up a localized string similar to Operation aborted.. Looks up a localized string similar to Operation aborted due to an exception (see InnerException for details).. Looks up a localized string similar to {0} does not support parallel transactions.. Looks up a localized string similar to Failed to convert parameter value from a {0} to a {1}.. Looks up a localized string similar to Parameter value '{0}' is out of range.. Looks up a localized string similar to Can not start another operation while there is an asynchronous operation pending.. Looks up a localized string similar to Type mismatch.. Looks up a localized string similar to Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.. Looks up a localized string similar to {0}.Prepare method requires parameters of type '{1}' have an explicitly set Precision and Scale.. Looks up a localized string similar to {0}.Prepare method requires all variable length parameters to have an explicitly set non-zero Size.. Looks up a localized string similar to {0}.Prepare method requires all parameters to have an explicitly set type.. Looks up a localized string similar to The '{0}' property requires Microsoft WindowsNT or a WindowsNT based operating system.. Looks up a localized string similar to {0} requires open connection when the quote prefix has not been set.. Looks up a localized string similar to When batching, the command's UpdatedRowSource property value of UpdateRowSource.FirstReturnedRecord or UpdateRowSource.Both is invalid.. Looks up a localized string similar to RowUpdatedEvent: Errors occurred; no additional is information available.. Looks up a localized string similar to RowUpdatingEvent: Errors occurred; no additional is information available.. Looks up a localized string similar to The only acceptable value for the property '{0}' is '{1}'.. Looks up a localized string similar to Invalid attempt to {0} when stream is closed.. Looks up a localized string similar to The transaction assigned to this command must be the most nested pending local transaction.. Looks up a localized string similar to The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.. Looks up a localized string similar to The transaction is either not associated with the current connection or has been completed.. Looks up a localized string similar to Connection currently has transaction enlisted. Finish current transaction and retry.. Looks up a localized string similar to {0} requires the command to have a transaction when the connection assigned to the command is in a pending local transaction. The Transaction property of the command has not been initialized.. Looks up a localized string similar to This {0} has completed; it is no longer usable.. Looks up a localized string similar to Unable to load the UDL file.. Looks up a localized string similar to Can not determine the correct boolean literal values. Boolean literals can not be created.. Looks up a localized string similar to {1}[{0}]: the Size property has an invalid size of 0.. Looks up a localized string similar to No mapping exists from object type {0} to a known managed provider native type.. Looks up a localized string similar to Unable to handle an unknown TypeCode {0} returned by Type {1}.. Looks up a localized string similar to Literals of the native data type associated with data type '{0}' are not supported.. Looks up a localized string similar to The StatementType {0} is not expected here.. Looks up a localized string similar to Concurrency violation: the batched command affected {0} of the expected {1} records.. Looks up a localized string similar to Concurrency violation: the DeleteCommand affected {0} of the expected {1} records.. Looks up a localized string similar to Concurrency violation: the UpdateCommand affected {0} of the expected {1} records.. Looks up a localized string similar to DataRow[{0}] is from a different DataTable than DataRow[0].. Looks up a localized string similar to Update requires the command clone to be valid.. Looks up a localized string similar to Update requires a valid DeleteCommand when passed DataRow collection with deleted rows.. Looks up a localized string similar to Update requires a valid InsertCommand when passed DataRow collection with new rows.. Looks up a localized string similar to Auto SQL generation during Update requires a valid SelectCommand.. Looks up a localized string similar to Update requires a valid UpdateCommand when passed DataRow collection with modified rows.. Looks up a localized string similar to Update unable to find TableMapping['{0}'] or DataTable '{0}'.. Looks up a localized string similar to Update: expected a non-empty SourceTable name.. Looks up a localized string similar to The version of SQL Server in use does not support datatype '{0}'.. Looks up a localized string similar to Destination array is not long enough to copy all the items in the collection. Check array index and length.. Looks up a localized string similar to Only single dimensional arrays are supported for the requested action.. Looks up a localized string similar to Cannot remove the specified item because it was not found in the specified Collection.. Looks up a localized string similar to Non-negative number required.. Looks up a localized string similar to The validation of an attestation token failed. The token signature does not match the computed signature using a public key retrieved from the attestation public key endpoint at '{0}'. Verify the DNS mapping for the endpoint - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details. If correct, contact Customer Support Services.. Looks up a localized string similar to .database.chinacloudapi.cn. Looks up a localized string similar to .database.windows.net. Looks up a localized string similar to .database.cloudapi.de. Looks up a localized string similar to .database.usgovcloudapi.net. Looks up a localized string similar to There is more than one table with the same name '{0}' (even if namespace is different).. Looks up a localized string similar to Cannot generate identifier for name '{0}'.. Looks up a localized string similar to Column '{0}': Type '{1}' does not have parameterless constructor.. Looks up a localized string similar to Column '{0}': Type '{1}' does not have constructor with string argument.. Looks up a localized string similar to Column '{0}': Type '{1}' cannot be null.. Looks up a localized string similar to Occurs whenever this collection's membership changes.. Looks up a localized string similar to Only elements allowed.. Looks up a localized string similar to Child nodes not allowed.. Looks up a localized string similar to The requested .NET Framework Data Provider's implementation does not have an Instance field of a System.Data.Common.DbProviderFactory derived type.. Looks up a localized string similar to The missing .NET Framework Data Provider's assembly qualified name is required.. Looks up a localized string similar to Unable to find the requested .NET Framework Data Provider. It may not be installed.. Looks up a localized string similar to Failed to find or load the registered .NET Framework Data Provider.. Looks up a localized string similar to Required attribute '{0}' cannot be empty.. Looks up a localized string similar to Required attribute '{0}' not found.. Looks up a localized string similar to The '{0}' section can only appear once per config file.. Looks up a localized string similar to Unrecognized attribute '{0}'.. Looks up a localized string similar to Unrecognized element.. Looks up a localized string similar to Indicates the name of this constraint.. Looks up a localized string similar to Indicates the table of this constraint.. Looks up a localized string similar to '{0}' argument contains null value.. Looks up a localized string similar to '{0}' argument cannot be null.. Looks up a localized string similar to '{0}' argument is out of range.. Looks up a localized string similar to Collection itself is not modifiable.. Looks up a localized string similar to The given name '{0}' matches at least two names in the collection object with different cases, but does not match either of them with the same case.. Looks up a localized string similar to Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.. Looks up a localized string similar to Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.. Looks up a localized string similar to The given name '{0}' matches at least two names in the collection object with different namespaces.. Looks up a localized string similar to Whether or not Fill will call DataRow.AcceptChanges.. Looks up a localized string similar to Whether or not Update will call DataRow.AcceptChanges.. Looks up a localized string similar to Whether or not to continue to the next DataRow when the Update events, RowUpdating and RowUpdated, Status is UpdateStatus.ErrorsOccurred.. Looks up a localized string similar to Event triggered when a recoverable error occurs during Fill.. Looks up a localized string similar to How the adapter fills the DataTable from the DataReader.. Looks up a localized string similar to The action taken when a table or column in the TableMappings is missing.. Looks up a localized string similar to The action taken when a table or column in the DataSet is missing.. Looks up a localized string similar to Should Fill return provider specific values or common CLSCompliant values.. Looks up a localized string similar to How to map source table to DataSet table.. Looks up a localized string similar to Action. Looks up a localized string similar to Advanced. Looks up a localized string similar to Behavior. Looks up a localized string similar to Connection Resiliency. Looks up a localized string similar to Context. Looks up a localized string similar to Data. Looks up a localized string similar to Fill. Looks up a localized string similar to InfoMessage. Looks up a localized string similar to Initialization. Looks up a localized string similar to Mapping. Looks up a localized string similar to Named ConnectionString. Looks up a localized string similar to Notification. Looks up a localized string similar to Pooling. Looks up a localized string similar to Replication. Looks up a localized string similar to Schema. Looks up a localized string similar to Security. Looks up a localized string similar to Source. Looks up a localized string similar to StateChange. Looks up a localized string similar to StatementCompleted. Looks up a localized string similar to UDT. Looks up a localized string similar to Update. Looks up a localized string similar to XML. Looks up a localized string similar to Cannot set AutoIncrement property for a column with DefaultValue set.. Looks up a localized string similar to Cannot set AutoIncrement property for a computed column.. Looks up a localized string similar to Cannot change AutoIncrement of a DataColumn with type '{0}' once it has data.. Looks up a localized string similar to AutoIncrementStep must be a non-zero value.. Looks up a localized string similar to Cannot change the Column '{0}' property Namespace. The Column is SimpleContent.. Looks up a localized string similar to The DateTimeMode can be set only on DataColumns of type DateTime.. Looks up a localized string similar to Cannot set Column '{0}' property MaxLength to '{1}'. There is at least one string in the table longer than the new limit.. Looks up a localized string similar to Cannot set Column '{0}' property MaxLength. The Column is SimpleContent.. Looks up a localized string similar to Cannot set Column '{0}' to be null. Please use DBNull instead.. Looks up a localized string similar to Cannot set Column '{0}' property MappingType to SimpleContent. The Column DataType is {1}.. Looks up a localized string similar to Cannot set Column '{0}' property DataType to {1}. The Column is SimpleContent.. Looks up a localized string similar to Cannot change DataType of a column once it has data.. Looks up a localized string similar to Cannot change DateTimeMode from '{0}' to '{1}' once the table has data.. Looks up a localized string similar to Cannot set a DefaultValue on an AutoIncrement column.. Looks up a localized string similar to The DefaultValue for column {0} is of type {1}, but the column is of type {2}.. Looks up a localized string similar to The DefaultValue for column {0} is of type {1} and cannot be converted to {2}.. Looks up a localized string similar to The DefaultValue for the column is of type {0} and cannot be converted to {1}.. Looks up a localized string similar to Column '{0}' exceeds the MaxLength limit.. Looks up a localized string similar to Cannot set Expression property on column {0}, because it is a part of a constraint.. Looks up a localized string similar to Cannot set expression because column cannot be made ReadOnly.. Looks up a localized string similar to Cannot create an expression on a column that has AutoIncrement or Unique.. Looks up a localized string similar to Cannot set Expression property due to circular reference in the expression.. Looks up a localized string similar to Cannot create a constraint based on Expression column {0}.. Looks up a localized string similar to MaxLength applies to string data type only. You cannot set Column '{0}' property MaxLength to be non-negative number.. Looks up a localized string similar to Type '{0}' does not contain static Null property or field.. Looks up a localized string similar to DataColumn with type '{0}' is a complexType. Can not serialize value of a complex type as Attribute. Looks up a localized string similar to '{0}' is Invalid DataSetDateTime value.. Looks up a localized string similar to Cannot set column '{0}'. The value violates the MaxLength limit of this column.. Looks up a localized string similar to ColumnName is required when it is part of a DataTable.. Looks up a localized string similar to Column '{0}' contains non-unique values.. Looks up a localized string similar to Column '{0}' does not allow DBNull.Value.. Looks up a localized string similar to Column must belong to a table.. Looks up a localized string similar to Column '{0}' does not belong to table {1}.. Looks up a localized string similar to Column '{0}' does not belong to underlying table '{1}'.. Looks up a localized string similar to DataSet does not support System.Nullable<>.. Looks up a localized string similar to Column requires a valid DataType.. Looks up a localized string similar to Column '{0}' has null values in it.. Looks up a localized string similar to Column '{0}' does not allow nulls.. Looks up a localized string similar to Ordinal '{0}' exceeds the maximum number.. Looks up a localized string similar to Column '{0}' is read only.. Looks up a localized string similar to Cannot change ReadOnly property for the expression column.. Looks up a localized string similar to SetAdded and SetModified can only be called on DataRows with Unchanged DataRowState.. Looks up a localized string similar to Couldn't store <{0}> in {1} Column. Expected type is {2}.. Looks up a localized string similar to Type '{0}' does not implement IRevertibleChangeTracking; therefore can not proceed with RejectChanges().. Looks up a localized string similar to Cannot change Unique property for the expression column.. Looks up a localized string similar to Indicates whether null values are allowed in this column.. Looks up a localized string similar to Indicates whether the column automatically increments itself for new rows added to the table. The type of this column must be Int16, Int32, or Int64.. Looks up a localized string similar to Indicates the starting value for an AutoIncrement column.. Looks up a localized string similar to Indicates the increment used by an AutoIncrement column.. Looks up a localized string similar to Indicates the default user-interface caption for this column.. Looks up a localized string similar to Indicates the name used to look up this column in the Columns collection of a DataTable.. Looks up a localized string similar to Returns the DataTable to which this column belongs.. Looks up a localized string similar to Indicates the type of data stored in this column.. Looks up a localized string similar to Indicates DateTimeMode of this DataColumn.. Looks up a localized string similar to Indicates the default column value used when adding new rows to the table.. Looks up a localized string similar to Indicates the value that this column computes for each row based on other columns instead of taking user input.. Looks up a localized string similar to DataColumn.ColumnName. Looks up a localized string similar to Source column name - case sensitive.. Looks up a localized string similar to Indicates how this column persists in XML: as an attribute, element, simple content node, or nothing.. Looks up a localized string similar to The number of items in the collection. Looks up a localized string similar to The specified DataColumnMapping object.. Looks up a localized string similar to Indicates the maximum length of the value this column allows.. Looks up a localized string similar to Indicates the XML uri for elements or attributes stored in this column.. Looks up a localized string similar to Indicates the index of this column in the Columns collection.. Looks up a localized string similar to Indicates the Prefix used for this DataColumn in xml representation.. Looks up a localized string similar to Indicates whether this column allows changes once a row has been added to the table.. Looks up a localized string similar to Column '{0}' already belongs to this DataTable.. Looks up a localized string similar to Column '{0}' already belongs to another DataTable.. Looks up a localized string similar to Cannot have more than one SimpleContent columns in a DataTable.. Looks up a localized string similar to Cannot add a SimpleContent column to a table containing element columns or nested relations.. Looks up a localized string similar to A column named '{0}' already belongs to this DataTable.. Looks up a localized string similar to Cannot add a column named '{0}': a nested table with the same name already belongs to this DataTable.. Looks up a localized string similar to A column named '{0}' already belongs to this DataTable: cannot set a nested table name to the same name.. Looks up a localized string similar to Cannot find column {0}.. Looks up a localized string similar to Cannot remove a column that doesn't belong to this table.. Looks up a localized string similar to Cannot remove this column, because it is part of the parent key for relationship {0}.. Looks up a localized string similar to Cannot remove this column, because it is a part of the constraint {0} on the table {1}.. Looks up a localized string similar to Cannot remove this column, because it is part of an expression: {0} = {1}.. Looks up a localized string similar to Cannot remove this column, because it's part of the primary key.. Looks up a localized string similar to Indicates whether this column should restrict its values in the rows of the table to be unique.. Looks up a localized string similar to This constraint cannot be added since ForeignKey doesn't belong to table {0}.. Looks up a localized string similar to Cannot add primary key constraint since primary key is already set for the table.. Looks up a localized string similar to Property not accessible because '{0}'.. Looks up a localized string similar to Cannot add constraint to DataTable '{0}' which is a child table in two nested relations.. Looks up a localized string similar to Cannot delete this row because constraints are enforced on relation {0}, and deleting this row will strand child rows.. Looks up a localized string similar to Cannot make this change because constraints are enforced on relation {0}, and changing this value will strand child rows.. Looks up a localized string similar to Cannot clear table {0} because ForeignKeyConstraint {1} enforces constraints and there are child rows in {2}.. Looks up a localized string similar to Constraint matches constraint named {0} already in collection.. Looks up a localized string similar to A Constraint named '{0}' already belongs to this DataTable.. Looks up a localized string similar to ForeignKeyConstraint {0} requires the child key values ({1}) to exist in the parent table.. Looks up a localized string similar to These columns don't point to this table.. Looks up a localized string similar to Cannot remove unique constraint '{0}'. Remove foreign key constraint '{1}' first.. Looks up a localized string similar to Cannot change the name of a constraint to empty string when it is in the ConstraintCollection.. Looks up a localized string similar to Constraint '{0}' does not belong to this DataTable.. Looks up a localized string similar to Cannot find constraint {0}.. Looks up a localized string similar to This constraint cannot be enabled as not all values have corresponding parent values.. Looks up a localized string similar to Cannot remove a constraint that doesn't belong to this table.. Looks up a localized string similar to Cannot remove this row because it has child rows, and constraints on relation {0} are enforced.. Looks up a localized string similar to These columns don't currently have unique values.. Looks up a localized string similar to Cannot enforce constraints on constraint {0}.. Looks up a localized string similar to Column '{0}' is constrained to be unique. Value '{1}' is already present.. Looks up a localized string similar to This type of node cannot be cloned: {0}.. Looks up a localized string similar to Cannot change the ColumnMapping property once the associated DataSet is mapped to a loaded XML document.. Looks up a localized string similar to Cannot change the column name once the associated DataSet is mapped to a loaded XML document.. Looks up a localized string similar to Cannot change the column namespace once the associated DataSet is mapped to a loaded XML document.. Looks up a localized string similar to Cannot change the DataSet name once the DataSet is mapped to a loaded XML document.. Looks up a localized string similar to Cannot add, remove, or change Nested relations from the DataSet once the DataSet is mapped to a loaded XML document.. Looks up a localized string similar to The DataSet parameter is invalid. It cannot be null.. Looks up a localized string similar to Cannot add or remove tables from the DataSet once the DataSet is mapped to a loaded XML document.. Looks up a localized string similar to Please set DataSet.EnforceConstraints == false before trying to edit XmlDataDocument using XML operations.. Looks up a localized string similar to Invalid foliation.. Looks up a localized string similar to DataSet can be associated with at most one XmlDataDocument. Cannot associate the DataSet with the current XmlDataDocument because the DataSet is already associated with another XmlDataDocument.. Looks up a localized string similar to Cannot load XmlDataDocument if it already contains data. Please use a new XmlDataDocument.. Looks up a localized string similar to Clear function on DateSet and DataTable is not supported on XmlDataDocument.. Looks up a localized string similar to Cannot create entity references on DataDocument.. Looks up a localized string similar to GetElementById() is not supported on DataDocument.. Looks up a localized string similar to Cannot add or remove columns from the table once the DataSet is mapped to a loaded XML document.. Looks up a localized string similar to Cannot change the table name once the associated DataSet is mapped to a loaded XML document.. Looks up a localized string similar to Cannot change the table namespace once the associated DataSet is mapped to a loaded XML document.. Looks up a localized string similar to Find finds a row based on a Sort order, and no Sort order is specified.. Looks up a localized string similar to Expecting {0} value(s) for the key being indexed, but received {1} value(s).. Looks up a localized string similar to The RowStates parameter must be set to a valid combination of values from the DataViewRowState enumeration.. Looks up a localized string similar to Cannot create a Key when the same column is listed more than once: '{0}'. Looks up a localized string similar to Cannot have 0 columns.. Looks up a localized string similar to Cannot remove unique constraint since it's the primary key of a table.. Looks up a localized string similar to Cannot remove unique constraint since it's the primary key of table {0}.. Looks up a localized string similar to Cannot create a Key from Columns that belong to different tables.. Looks up a localized string similar to Cannot have more than {0} columns.. Looks up a localized string similar to <target>.{0} and <source>.{0} have conflicting properties: DataType property mismatch.. Looks up a localized string similar to Target table {0} missing definition for column {1}.. Looks up a localized string similar to Target DataSet missing {0} {1}.. Looks up a localized string similar to Target DataSet missing definition for {0}.. Looks up a localized string similar to PrimaryKey column {0} does not exist in source Table.. Looks up a localized string similar to Mismatch columns in the PrimaryKey : <target>.{0} versus <source>.{1}.. Looks up a localized string similar to <target>.PrimaryKey and <source>.PrimaryKey have different Length.. Looks up a localized string similar to Relation {0} cannot be merged, because keys have mismatch columns.. Looks up a localized string similar to A relation already exists for these child columns.. Looks up a localized string similar to This relation already belongs to another DataSet.. Looks up a localized string similar to This relation already belongs to this DataSet.. Looks up a localized string similar to Cannot add a DataRelation or Constraint that has different Locale or CaseSensitive settings between its parent and child tables.. Looks up a localized string similar to Cannot add a relation to this table's ParentRelation collection where this table isn't the child table.. Looks up a localized string similar to Parent Columns and Child Columns don't have type-matching columns.. Looks up a localized string similar to Cannot have a relationship between tables in different DataSets.. Looks up a localized string similar to This relation doesn't belong to this relation collection.. Looks up a localized string similar to A Relation named '{0}' already belongs to this DataSet.. Looks up a localized string similar to This relation should connect two tables in this DataSet to be added to this DataSet.. Looks up a localized string similar to The row doesn't belong to the same DataSet as this relation.. Looks up a localized string similar to GetChildRows requires a row whose Table is {0}, but the specified row's Table is {1}.. Looks up a localized string similar to GetParentRow requires a row whose Table is {0}, but the specified row's Table is {1}.. Looks up a localized string similar to Nested table '{0}' with empty namespace cannot have multiple parent tables in different namespaces.. Looks up a localized string similar to Nested table '{0}' which inherits its namespace cannot have multiple parent tables in different namespaces.. Looks up a localized string similar to ParentKey and ChildKey are identical.. Looks up a localized string similar to ParentColumns and ChildColumns should be the same length.. Looks up a localized string similar to ParentColumns and ChildColumns must not be zero length.. Looks up a localized string similar to The table ({0}) cannot be the child table to itself in nested relations.. Looks up a localized string similar to RelationName is required when it is part of a DataSet.. Looks up a localized string similar to Relation {0} does not belong to this DataSet.. Looks up a localized string similar to Cannot find relation {0}.. Looks up a localized string similar to Cannot create a DataRelation if Parent or Child Columns are not in a DataSet.. Looks up a localized string similar to Cannot add a relation to this table's ChildRelation collection where this table isn't the parent table.. Looks up a localized string similar to Cannot set the 'Nested' property to false for this relation.. Looks up a localized string similar to SetParentRow requires a child row whose Table is {0}, but the specified row's Table is {1}.. Looks up a localized string similar to The same table '{0}' cannot be the child table in two nested relations.. Looks up a localized string similar to Cannot create a collection on a null table.. Looks up a localized string similar to Cannot create a relation between tables in different DataSets.. Looks up a localized string similar to The table this collection displays relations for has been removed from its DataSet.. Looks up a localized string similar to Indicates the child columns of this relation.. Looks up a localized string similar to Indicates whether relations are nested.. Looks up a localized string similar to Indicates the parent columns of this relation.. Looks up a localized string similar to The name used to look up this relation in the Relations collection of a DataSet.. Looks up a localized string similar to Cannot delete this row since it's already deleted.. Looks up a localized string similar to This row already belongs to another table.. Looks up a localized string similar to This row already belongs to this table.. Looks up a localized string similar to Cannot remove a row that's already been removed.. Looks up a localized string similar to Cannot call BeginEdit() inside the RowChanging event.. Looks up a localized string similar to Cannot call CancelEdit() inside an OnRowChanging event. Throw an exception to cancel this update.. Looks up a localized string similar to Deleted row information cannot be accessed through the row.. Looks up a localized string similar to Cannot call Delete inside an OnRowDeleting event. Throw an exception to cancel this delete.. Looks up a localized string similar to Cannot change a proposed value in the RowChanging event.. Looks up a localized string similar to This row is empty.. Looks up a localized string similar to Cannot call EndEdit() inside an OnRowChanging event.. Looks up a localized string similar to Unrecognized row state bit pattern.. Looks up a localized string similar to Version must be Original, Current, or Proposed.. Looks up a localized string similar to A child row has multiple parents.. Looks up a localized string similar to There is no Current data to access.. Looks up a localized string similar to There is no Original data to access.. Looks up a localized string similar to There is no Proposed data to access.. Looks up a localized string similar to The row doesn't belong to the same DataSet as this relation.. Looks up a localized string similar to Cannot perform this operation on a row not in the table.. Looks up a localized string similar to There is no row at position {0}.. Looks up a localized string similar to This relation and child row don't belong to same DataSet.. Looks up a localized string similar to This row has been removed from a table and does not have any data. BeginEdit() will allow creation of new data in this row.. Looks up a localized string similar to Values are missing in the rowOrder sequence for table '{0}'.. Looks up a localized string similar to The row insert position {0} is invalid.. Looks up a localized string similar to The rowOrder value={0} has been found twice for table named '{1}'.. Looks up a localized string similar to The given DataRow is not in the current DataRowCollection.. Looks up a localized string similar to Input array is longer than the number of columns in this table.. Looks up a localized string similar to {0} is neither a DataColumn nor a DataRelation for table {1}.. Looks up a localized string similar to Cannot change CaseSensitive or Locale property. This change would lead to at least one DataRelation or Constraint to have different Locale or CaseSensitive settings between its related tables.. Looks up a localized string similar to SchemaSerializationMode property can be set only if it is overridden by derived DataSet.. Looks up a localized string similar to Constraint Exception.. Looks up a localized string similar to Data Exception.. Looks up a localized string similar to Deleted rows inaccessible.. Looks up a localized string similar to Duplicate name not allowed.. Looks up a localized string similar to Operation not supported in the RowChanging event.. Looks up a localized string similar to Invalid constraint.. Looks up a localized string similar to Missing primary key.. Looks up a localized string similar to Null not allowed.. Looks up a localized string similar to Column is marked read only.. Looks up a localized string similar to Row not found in table.. Looks up a localized string similar to Version not found.. Looks up a localized string similar to The name '{0}' is invalid. A DataSet cannot have the same name of the DataTable.. Looks up a localized string similar to Cannot change the name of the DataSet to an empty string.. Looks up a localized string similar to The schema namespace is invalid. Please use this one instead: {0}.. Looks up a localized string similar to Indicates whether comparing strings within the DataSet is case sensitive.. Looks up a localized string similar to The name of this DataSet.. Looks up a localized string similar to Indicates a custom "view" of the data contained by the DataSet. This view allows filtering, searching, and navigating through the custom data view.. Looks up a localized string similar to Represents an in-memory cache of data.. Looks up a localized string similar to Indicates whether constraint rules are to be followed.. Looks up a localized string similar to Indicates that the DataSet has errors.. Looks up a localized string similar to Occurs after Initialization is finished.. Looks up a localized string similar to Indicates a locale under which to compare strings within the DataSet.. Looks up a localized string similar to Occurs when it is not possible to merge schemas for two tables with the same name.. Looks up a localized string similar to Indicates the XML uri namespace for the root element pointed at by this DataSet.. Looks up a localized string similar to Indicates the prefix of the namespace used for this DataSet.. Looks up a localized string similar to The collection that holds the relations for this DataSet.. Looks up a localized string similar to The collection that holds the tables for this DataSet.. Looks up a localized string similar to Invalid usage of aggregate function {0}() and Type: {1}.. Looks up a localized string similar to Type '{0}' does not implement IComparable interface. Comparison cannot be done.. Looks up a localized string similar to Invalid storage type: {0}.. Looks up a localized string similar to The DataSet Xml persistency does not support the value '{0}' as Char value, please use Byte storage instead.. Looks up a localized string similar to Type of value has a mismatch with column type. Looks up a localized string similar to DataTable already belongs to another DataSet.. Looks up a localized string similar to DataTable already belongs to this DataSet.. Looks up a localized string similar to Cannot add a nested relation or an element column to a table containing a SimpleContent column.. Looks up a localized string similar to This DataTable can only be remoted as part of DataSet. One or more Expression Columns has reference to other DataTable(s).. Looks up a localized string similar to Cannot serialize the DataTable. A DataTable being used in one or more DataColumn expressions is not a descendant of current DataTable.. Looks up a localized string similar to Cannot serialize the DataTable. DataTable name is not set.. Looks up a localized string similar to Cannot have different remoting format property value for DataSet and DataTable.. Looks up a localized string similar to The name '{0}' is invalid. A DataTable cannot have the same name of the DataSet.. Looks up a localized string similar to A DataTable named '{0}' already belongs to this DataSet.. Looks up a localized string similar to A DataTable named '{0}' with the same Namespace '{1}' already belongs to this DataSet.. Looks up a localized string similar to PrimaryKey columns do not belong to this table.. Looks up a localized string similar to Cannot remove table {0}, because it referenced in ForeignKeyConstraint {1}. Remove the constraint first.. Looks up a localized string similar to Cannot remove a table that has existing relations. Remove relations first.. Looks up a localized string similar to {0} isn't a valid Sort string entry.. Looks up a localized string similar to Table doesn't have a primary key.. Looks up a localized string similar to DataTable already has a simple content column.. Looks up a localized string similar to TableName is required when it is part of a DataSet.. Looks up a localized string similar to Table {0} does not belong to this DataSet.. Looks up a localized string similar to Cannot find table {0}.. Looks up a localized string similar to The table ({0}) cannot be the child table to itself in a nested relation: the DataSet name conflicts with the table name.. Looks up a localized string similar to DataTable '{0}' does not match to any DataTable in source.. Looks up a localized string similar to Indicates whether comparing strings within the table is case sensitive.. Looks up a localized string similar to Returns the child relations for this table.. Looks up a localized string similar to Occurs when a value has been changed for this column.. Looks up a localized string similar to Occurs when a value has been submitted for this column. The user can modify the proposed value and should throw an exception to cancel the edit.. Looks up a localized string similar to The collection that holds the columns for this table.. Looks up a localized string similar to The collection that holds the constraints for this table.. Looks up a localized string similar to Indicates the DataSet to which this table belongs.. Looks up a localized string similar to This is the default DataView for the table.. Looks up a localized string similar to The expression used to compute the data-bound value of this row.. Looks up a localized string similar to Returns whether the table has errors.. Looks up a localized string similar to Indicates a locale under which to compare strings within the table.. Looks up a localized string similar to Individual columns mappings when this table mapping is matched.. Looks up a localized string similar to DataTable.TableName. Looks up a localized string similar to The DataTableMapping source table name. This name is case sensitive.. Looks up a localized string similar to The number of items in the collection. Looks up a localized string similar to The specified DataTableMapping object. Looks up a localized string similar to Indicates an initial starting size for this table.. Looks up a localized string similar to Indicates the XML uri namespace for the elements contained in this table.. Looks up a localized string similar to Returns the parent relations for this table.. Looks up a localized string similar to Indicates the Prefix of the namespace used for this table in XML representation.. Looks up a localized string similar to Indicates the column(s) that represent the primary key for this table.. Looks up a localized string similar to Cannot create DataTableReader. Arguments contain null value.. Looks up a localized string similar to DataTableReader Cannot be created. There is no DataTable in DataSet.. Looks up a localized string similar to Current DataTable '{0}' is empty. There is no DataRow in DataTable.. Looks up a localized string similar to Cannot create DataTableReader. Argument is Empty.. Looks up a localized string similar to DataTableReader is invalid for current DataTable '{0}'.. Looks up a localized string similar to Current DataRow is either in Deleted or Detached state.. Looks up a localized string similar to Schema of current DataTable '{0}' in DataTableReader has changed, DataTableReader is invalid.. Looks up a localized string similar to Occurs after a row in the table has been successfully edited.. Looks up a localized string similar to Occurs when the row is being changed so that the event handler can modify or cancel the change. The user can modify values in the row and should throw an exception to cancel the edit.. Looks up a localized string similar to Occurs after a row in the table has been successfully deleted.. Looks up a localized string similar to Occurs when a row in the table marked for deletion. Throw an exception to cancel the deletion.. Looks up a localized string similar to Occurs after all rows in the table has been successfully cleared.. Looks up a localized string similar to Occurs prior to clearing all rows from the table.. Looks up a localized string similar to Indicates the collection that holds the rows of data for this table.. Looks up a localized string similar to Occurs after a new DataRow has been instantiated.. Looks up a localized string similar to Indicates the name used to look up this table in the Tables collection of a DataSet.. Looks up a localized string similar to Cannot add external objects to this list.. Looks up a localized string similar to Cannot call AddNew on a DataView where AllowNew is false.. Looks up a localized string similar to Cannot bind to DataTable with no name.. Looks up a localized string similar to Cannot clear this list.. Looks up a localized string similar to Cannot delete on a DataSource where AllowDelete is false.. Looks up a localized string similar to Cannot edit on a DataSource where AllowEdit is false.. Looks up a localized string similar to Cannot change DataSet property once it is set.. Looks up a localized string similar to Cannot change Table property once it is set.. Looks up a localized string similar to DataTable must be set prior to using DataView.. Looks up a localized string similar to DataSet must be set prior to using DataViewManager.. Looks up a localized string similar to The relation is not parented to the table to which this DataView points.. Looks up a localized string similar to Index {0} is either negative or above rows count.. Looks up a localized string similar to Cannot insert external objects to this list.. Looks up a localized string similar to DataView is not open.. Looks up a localized string similar to Cannot remove objects not in the list.. Looks up a localized string similar to Cannot change DataSet on a DataViewManager that's already the default view for a DataSet.. Looks up a localized string similar to Cannot set {0}.. Looks up a localized string similar to Cannot set an object into this list.. Looks up a localized string similar to RowStateFilter cannot show ModifiedOriginals and ModifiedCurrents at the same time.. Looks up a localized string similar to Cannot change Table property on a DefaultView or a DataView coming from a DataViewManager.. Looks up a localized string similar to Indicates whether this DataView and the user interface associated with it allows deletes.. Looks up a localized string similar to Indicates whether this DataView and the user interface associated with it allows edits.. Looks up a localized string similar to Indicates whether this DataView and the user interface associated with it allows new rows to be added.. Looks up a localized string similar to Indicates whether to use the default sort if the Sort property is not set.. Looks up a localized string similar to Returns the number of items currently in this view.. Looks up a localized string similar to This returns a pointer to back to the DataViewManager that owns this DataSet (if any).. Looks up a localized string similar to Indicates whether the view is open.. Looks up a localized string similar to Indicates that the data returned by this DataView has somehow changed.. Looks up a localized string similar to Indicates the source of data for this DataViewManager.. Looks up a localized string similar to Indicates the sorting/filtering/state settings for any table in the corresponding DataSet.. Looks up a localized string similar to Indicates an expression used to filter the data returned by this DataView.. Looks up a localized string similar to Indicates the versions of data returned by this DataView.. Looks up a localized string similar to Indicates the names of the column and the order in which data is returned by this DataView.. Looks up a localized string similar to Indicates the table this DataView uses to get data.. Looks up a localized string similar to Command text to execute.. Looks up a localized string similar to Time to wait for command to execute.. Looks up a localized string similar to How to interpret the CommandText.. Looks up a localized string similar to Connection used by the command.. Looks up a localized string similar to The parameters collection.. Looks up a localized string similar to When records are affected by a given statement by the execution of the command.. Looks up a localized string similar to The transaction used by the command.. Looks up a localized string similar to When used by a DataAdapter.Update, how command results are applied to the current DataRow.. Looks up a localized string similar to Indicates the position of the catalog name in a qualified table name in a text command.. Looks up a localized string similar to The character that separates the catalog name from the rest of the identifier in a text command.. Looks up a localized string similar to How the where clause is auto-generated for the Update and Delete commands when not specified by the user.. Looks up a localized string similar to The DataAdapter for which to automatically generate Commands.. Looks up a localized string similar to The prefix string wrapped around sql objects.. Looks up a localized string similar to The suffix string wrapped around sql objects.. Looks up a localized string similar to Use schema from DataTable or the SelectCommand.. Looks up a localized string similar to The character that separates the schema name from the rest of the identifier in a text command.. Looks up a localized string similar to How the set clause is auto-generated for the Update command when not specified by the user.. Looks up a localized string similar to Event triggered when messages arrive from the DataSource.. Looks up a localized string similar to The ConnectionState indicating whether the connection is open or closed.. Looks up a localized string similar to Event triggered when the connection changes state.. Looks up a localized string similar to When true, indicates that managed connection pooling should be used.. Looks up a localized string similar to Declares the application workload type when connecting to a server.. Looks up a localized string similar to The name of the application.. Looks up a localized string similar to When true, enables usage of the Asynchronous functionality in the .NET Framework Data Provider.. Looks up a localized string similar to The name of the primary file, including the full path name, of an attachable database.. Looks up a localized string similar to Specifies the method of authenticating with SQL Server.. Looks up a localized string similar to Specified client certificate for authenticating with SQL Server. . Looks up a localized string similar to When true, indicates the connection state is reset when removed from the pool.. Looks up a localized string similar to The connection string used to connect to the Data Source.. Looks up a localized string similar to Number of attempts to restore connection.. Looks up a localized string similar to Delay between attempts to restore connection.. Looks up a localized string similar to The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.. Looks up a localized string similar to When true, indicates the connection should be from the Sql Server context. Available only when running in the Sql Server process.. Looks up a localized string similar to The SQL Server Language record name.. Looks up a localized string similar to Indicates the name of the data source to connect to.. Looks up a localized string similar to The name of the ODBC Driver to use when connecting to the Data Source.. Looks up a localized string similar to The DSN to use when connecting to the Data Source.. Looks up a localized string similar to When true, SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed.. Looks up a localized string similar to Sessions in a Component Services (or MTS, if you are using Microsoft Windows NT) environment should automatically be enlisted in a global transaction where required.. Looks up a localized string similar to The name or network address of the instance of SQL Server that acts as a failover partner.. Looks up a localized string similar to The service principal name (SPN) of the failover partner.. Looks up a localized string similar to The UDL file to use when connecting to the Data Source.. Looks up a localized string similar to The hostname to be expected in the server's certificate when encryption is negotiated, if it's different from the default value derived from Addr/Address/Server.. Looks up a localized string similar to The name of the initial catalog or database in the data source.. Looks up a localized string similar to Whether the connection is to be a secure connection or not.. Looks up a localized string similar to The minimum amount of time (in seconds) for this connection to live in the pool before being destroyed.. Looks up a localized string similar to The maximum number of connections allowed in the pool.. Looks up a localized string similar to The minimum number of connections allowed in the pool.. Looks up a localized string similar to When true, multiple result sets can be returned and read from one connection.. Looks up a localized string similar to If your application is connecting to a high-availability, disaster recovery (AlwaysOn) availability group (AG) on different subnets, MultiSubnetFailover=Yes configures SqlConnection to provide faster detection of and connection to the (currently) active server.. Looks up a localized string similar to The network library used to establish a connection to an instance of SQL Server.. Looks up a localized string similar to Specifies which OLE DB Services to enable or disable with the OleDb Provider.. Looks up a localized string similar to Size in bytes of the network packets used to communicate with an instance of SQL Server.. Looks up a localized string similar to Indicates the password to be used when connecting to the data source.. Looks up a localized string similar to When false, security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state.. Looks up a localized string similar to Defines the blocking period behavior for a connection pool.. Looks up a localized string similar to When true, the connection object is drawn from the appropriate pool, or if necessary, is created and added to the appropriate pool.. Looks up a localized string similar to The name of the OLE DB Provider to use when connecting to the Data Source.. Looks up a localized string similar to Used by SQL Server in Replication.. Looks up a localized string similar to The path to a certificate file to match against the SQL Server TLS/SSL certificate.. Looks up a localized string similar to The service principal name (SPN) of the server.. Looks up a localized string similar to Indicates binding behavior of connection to a System.Transactions Transaction when enlisted.. Looks up a localized string similar to If your application connects to different networks, TransparentNetworkIPResolution=Yes configures SqlConnection to provide transparent connection resolution to the currently active server, independently of the network IP topology.. Looks up a localized string similar to When true (and encrypt=true), SQL Server uses SSL encryption for all data sent between the client and server without validating the server certificate.. Looks up a localized string similar to Indicates which server type system the provider will expose through the DataReader.. Looks up a localized string similar to Indicates the user ID to be used when connecting to the data source.. Looks up a localized string similar to Indicates whether the connection will be re-directed to connect to an instance of SQL Server running under the user's account.. Looks up a localized string similar to The name of the workstation connecting to SQL Server.. Looks up a localized string similar to Used during Update for deleted rows in DataSet.. Looks up a localized string similar to Used during Update for new rows in DataSet.. Looks up a localized string similar to Event triggered before every DataRow during Update.. Looks up a localized string similar to Event triggered after every DataRow during Update.. Looks up a localized string similar to Used during Fill/FillSchema.. Looks up a localized string similar to Number of rows to batch together before executing against the data source.. Looks up a localized string similar to Used during Update for modified rows in DataSet.. Looks up a localized string similar to Only necessary to set for decimal and numeric parameters when using with Prepare, FillSchema and CommandBuilder scenarios.. Looks up a localized string similar to Only necessary to set for decimal and numeric parameters when using with Prepare, FillSchema and CommandBuilder scenarios.. Looks up a localized string similar to The parameter generic type.. Looks up a localized string similar to Input, output, or bidirectional parameter.. Looks up a localized string similar to a design-time property used for strongly typed code-generation.. Looks up a localized string similar to Offset in variable length data types.. Looks up a localized string similar to Name of the parameter.. Looks up a localized string similar to Size of variable length data types (string & arrays).. Looks up a localized string similar to When used by a DataAdapter.Update, the source column name that is used to find the DataSetColumn name in the ColumnMappings. This is to copy a value between the parameter and a data row.. Looks up a localized string similar to When used by DataAdapter.Update, the parameter value is changed from DBNull.Value into (Int32)1 or (Int32)0 if non-null.. Looks up a localized string similar to When used by a DataAdapter.Update (UpdateCommand only), the version of the DataRow value that is used to update the data source.. Looks up a localized string similar to Value of the parameter.. Looks up a localized string similar to How are the Insert/Update/DeleteCommands generated when not set by the user.. Looks up a localized string similar to Connection used if the the Select/Insert/Update/DeleteCommands do not already have a connection.. Looks up a localized string similar to Used during Update for deleted rows in the DataTable.. Looks up a localized string similar to Used during Update for new rows in the DataTable.. Looks up a localized string similar to Should Fill return provider specific values or common CLSCompliant values.. Looks up a localized string similar to Used during Fill.. Looks up a localized string similar to How to map source table to DataTable.. Looks up a localized string similar to Number of rows to batch together before executing against the data source.. Looks up a localized string similar to Used during Update for modified rows in the DataTable.. Looks up a localized string similar to Internal error occurred when retrying the download of the HGS root certificate after the initial request failed. Contact Customer Support Services.. Looks up a localized string similar to Internal error. Unable to invalidate the requested enclave session, because it does not exist in the cache. Contact Customer Support Services.. Looks up a localized string similar to {0} returned {1}.. Looks up a localized string similar to The validation of an attestation token failed. The token received from SQL Server is expired. Contact Customer Support Services.. Looks up a localized string similar to Syntax error in aggregate argument: Expecting a single column argument with possible 'Child' qualifier.. Looks up a localized string similar to Unbound reference in the aggregate expression '{0}'.. Looks up a localized string similar to Operator '{0}' is ambiguous on operands of type '{1}' and '{2}'. Cannot mix signed and unsigned types. Please use explicit Convert() function.. Looks up a localized string similar to {0}() argument is out of range.. Looks up a localized string similar to Type mismatch in function argument: {0}(), argument {1}, expected {2}.. Looks up a localized string similar to Type mismatch in function argument: {0}(), argument {1}, expected one of the Integer types.. Looks up a localized string similar to Cannot find the parent relation '{0}'.. Looks up a localized string similar to Cannot evaluate. Expression '{0}' is not an aggregate.. Looks up a localized string similar to Cannot convert from {0} to {1}.. Looks up a localized string similar to Cannot convert value '{0}' to Type: {1}.. Looks up a localized string similar to Divide by zero error encountered.. Looks up a localized string similar to Cannot evaluate non-constant expression without current row.. Looks up a localized string similar to Expression is too complex.. Looks up a localized string similar to Unbound reference in the expression '{0}'.. Looks up a localized string similar to Filter expression '{0}' does not evaluate to a Boolean term.. Looks up a localized string similar to Invalid number of arguments: function {0}().. Looks up a localized string similar to The expression contains invalid date constant '{0}'.. Looks up a localized string similar to 'hours' argument is out of range. Value must be between -14 and +14.. Looks up a localized string similar to 'minutes' argument is out of range. Value must be between -59 and +59.. Looks up a localized string similar to Invalid column name [{0}].. Looks up a localized string similar to The expression contains invalid name: '{0}'.. Looks up a localized string similar to Error in Like operator: the string pattern '{0}' is invalid.. Looks up a localized string similar to The expression contains an invalid string constant: {0}.. Looks up a localized string similar to Provided range for time one exceeds total of 14 hours.. Looks up a localized string similar to Invalid type name '{0}'.. Looks up a localized string similar to Need a row or a table to Invoke DataFilter.. Looks up a localized string similar to Syntax error: The IN keyword must be followed by a non-empty list of expressions separated by commas, and also must be enclosed in parentheses.. Looks up a localized string similar to Syntax error: The items following the IN keyword must be separated by commas and be enclosed in parentheses.. Looks up a localized string similar to Syntax error: Invalid usage of 'Is' operator. Correct syntax: <expression> Is [Not] Null.. Looks up a localized string similar to Syntax error in Lookup expression: Expecting keyword 'Parent' followed by a single column argument with possible relation qualifier: Parent[(<relation_name>)].<column_name>.. Looks up a localized string similar to Kind property of provided DateTime argument, does not match 'hours' and 'minutes' arguments.. Looks up a localized string similar to Syntax error: Missing operand after '{0}' operator.. Looks up a localized string similar to Syntax error: Missing operand before '{0}' operator.. Looks up a localized string similar to The expression is missing the closing parenthesis.. Looks up a localized string similar to Only constant expressions are allowed in the expression list for the IN operator.. Looks up a localized string similar to The feature not implemented. {0}.. Looks up a localized string similar to Value is either too large or too small for Type '{0}'.. Looks up a localized string similar to Syntax error in the expression.. Looks up a localized string similar to The expression has too many closing parentheses.. Looks up a localized string similar to Type mismatch in expression '{0}'.. Looks up a localized string similar to Cannot perform '{0}' operation on {1} and {2}.. Looks up a localized string similar to Cannot find column [{0}].. Looks up a localized string similar to The expression contains undefined function call {0}().. Looks up a localized string similar to Cannot interpret token '{0}' at position {1}.. Looks up a localized string similar to Expected {0}, but actual token at the position {2} is {1}.. Looks up a localized string similar to The table [{0}] involved in more than one relation. You must explicitly mention a relation name in the expression '{1}'.. Looks up a localized string similar to The expression contains unsupported operator '{0}'.. Looks up a localized string similar to A DataColumn of type '{0}' does not support expression.. Looks up a localized string similar to The collection that holds custom user information.. Looks up a localized string similar to Failed to create enclave session as attestation server is busy.. Looks up a localized string similar to The validation of an attestation information failed. The attestation information has an invalid format. Contact Customer Support Services. Error details: '{0}'.. Looks up a localized string similar to The validation of an attestation token failed. The token has an invalid format. Contact Customer Support Services. Error details: '{0}'.. Looks up a localized string similar to For accept and reject changes, indicates what kind of cascading should take place across this relation.. Looks up a localized string similar to Indicates the child columns of this constraint.. Looks up a localized string similar to For deletions, indicates what kind of cascading should take place across this relation.. Looks up a localized string similar to Indicates the parent columns of this constraint.. Looks up a localized string similar to For updates, indicates what kind of cascading should take place across this relation.. Looks up a localized string similar to Indicates the child table of this constraint.. Looks up a localized string similar to The attestation service returned an expired HGS root certificate for attestation URL '{0}'. Check the HGS root certificate configured for your HGS instance - see https://go.microsoft.com/fwlink/?linkid=2160553 for more details.. Looks up a localized string similar to The obtained HGS root certificate for attestation URL '{0}' has an invalid format. Verify the attestation URL is correct and the HGS server is online and fully initialized - see https://go.microsoft.com/fwlink/?linkid=2160553 for more details. For additional support contact Customer Support Services. Error details: '{1}'.. Looks up a localized string similar to The validation of an attestation token failed. Cannot retrieve a public key from the attestation public key endpoint, or the retrieved key has an invalid format. Error details: '{0}'.. Looks up a localized string similar to Signature verification of the enclave's Diffie-Hellman key failed. Contact Customer Support Services.. Looks up a localized string similar to Global Transactions are not enabled for this Azure SQL Database. Please contact Azure SQL Database support for assistance.. Looks up a localized string similar to The currently loaded System.Transactions.dll does not support Global Transactions. Please upgrade to .NET Framework 4.6.2 or later.. Looks up a localized string similar to There are no records in the SqlDataRecord enumeration. To send a table-valued parameter with no rows, use a null reference for the value instead.. Looks up a localized string similar to The validation of an attestation token failed due to an error while decoding the enclave public key obtained from SQL Server. Contact Customer Support Services.. Looks up a localized string similar to The validation of an attestation token failed due to an error while computing a hash of the enclave public key obtained from SQL Server. Contact Customer Support Services.. Looks up a localized string similar to The validation of the attestation token has failed during signature validation. Exception: '{0}'.. Looks up a localized string similar to The validation of an attestation token failed. Claim '{0}' in the token has an invalid value of '{1}'. Verify the attestation policy - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details. If the policy is correct, contact Customer Support Services.. Looks up a localized string similar to Invalid column ordinals in schema table. ColumnOrdinals, if present, must not have duplicates or gaps.. Looks up a localized string similar to Indicates the columns of this constraint.. Looks up a localized string similar to Indicates if this constraint is a primary key.. Looks up a localized string similar to ReadOnly Data is Modified.. Looks up a localized string similar to Local Database Runtime: system.data.localdb configuration file section is of unknown type.. Looks up a localized string similar to Local Database Runtime: Cannot create named instance.. Looks up a localized string similar to Local Database Runtime: Cannot load SQLUserInstance.dll.. Looks up a localized string similar to Local Database Runtime: Invalid instance version specification found in the configuration file.. Looks up a localized string similar to Invalid SQLUserInstance.dll found at the location specified in the registry. Verify that the Local Database Runtime feature of SQL Server Express is properly installed.. Looks up a localized string similar to Cannot obtain Local Database Runtime error message. Looks up a localized string similar to LocalDB is not supported on this platform.. Looks up a localized string similar to The collection name '{0}' matches at least two collections with the same name but with different case, but does not match any of them exactly.. Looks up a localized string similar to There are multiple collections named '{0}'.. Looks up a localized string similar to The collection '{0}' is missing from the metadata XML.. Looks up a localized string similar to The DataSourceInformation table must contain exactly one row.. Looks up a localized string similar to '{2}' is not a valid value for the '{1}' restriction of the '{0}' schema collection.. Looks up a localized string similar to The metadata XML is invalid.. Looks up a localized string similar to The metadata XML is invalid. The {1} column of the {0} collection must contain a non-empty string.. Looks up a localized string similar to The metadata XML is invalid. The {0} collection must contain a {1} column and it must be a string column.. Looks up a localized string similar to One of the required DataSourceInformation tables columns is missing.. Looks up a localized string similar to One or more of the required columns of the restrictions collection is missing.. Looks up a localized string similar to A restriction exists for which there is no matching row in the restrictions collection.. Looks up a localized string similar to The schema table contains no columns.. Looks up a localized string similar to Unable to build the '{0}' collection because execution of the SQL query failed. See the inner exception for details.. Looks up a localized string similar to More restrictions were provided than the requested schema ('{0}') supports.. Looks up a localized string similar to Unable to build schema collection '{0}';. Looks up a localized string similar to The requested collection ({0}) is not defined.. Looks up a localized string similar to The population mechanism '{0}' is not defined.. Looks up a localized string similar to The requested collection ({0}) is not supported by this version of the provider.. Looks up a localized string similar to SqlDbType.Structured type is only supported for multiple valued types.. Looks up a localized string similar to The validation of the attestation token failed. Claim '{0}' is missing in the token. Verify the attestation policy - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details. If the policy is correct, contact Customer Support Services.. Looks up a localized string similar to Simple type '{0}' has already be declared with different '{1}'.. Looks up a localized string similar to Protocol error: A received message contains a valid signature but it was not encrypted as required by the effective Protection Level.. Looks up a localized string similar to Insufficient buffer space. Required: {0} Actual: {1}.. Looks up a localized string similar to GSSAPI operation failed with status: {0} (Minor status: {1}).. Looks up a localized string similar to GSSAPI operation failed with error - {0} ({1}).. Looks up a localized string similar to The specified value is not valid in the '{0}' enumeration.. Looks up a localized string similar to {0} failed with error {1}.. Looks up a localized string similar to This method is not implemented by this class.. Looks up a localized string similar to No support for channel binding on operating systems other than Windows.. Looks up a localized string similar to Target name should be non empty if default credentials are passed.. Looks up a localized string similar to Requested protection level is not supported with the GSSAPI implementation currently installed.. Looks up a localized string similar to Server implementation is not supported.. Looks up a localized string similar to NTLM authentication is not possible with default credentials on this platform.. Looks up a localized string similar to The requested security package is not supported.. Looks up a localized string similar to DateType column for field '{0}' in schema table is null. DataType must be non-null.. Looks up a localized string similar to {0} - unable to allocate an environment handle.. Looks up a localized string similar to {0} - unable to enable connection pooling.... Looks up a localized string similar to Can't set property on an open connection.. Looks up a localized string similar to The connection is closed.. Looks up a localized string similar to {0} [{1}] {2}. Looks up a localized string similar to {0} - no error information available. Looks up a localized string similar to {0} - unable to get descriptor handle.. Looks up a localized string similar to "The ODBC managed provider requires that the TABLE_NAME restriction be specified and non-null for the GetSchema indexes collection.. Looks up a localized string similar to {0} - unable to map type.. Looks up a localized string similar to The .NET Framework Odbc Data Provider requires Microsoft Data Access Components(MDAC) version 2.6 or later. Version {0} was found currently installed.. Looks up a localized string similar to Invalid negative argument!. Looks up a localized string similar to No valid mapping for a SQL_TRANSACTION '{0}' to a System.Data.IsolationLevel enumeration value.. Looks up a localized string similar to Not in a transaction. Looks up a localized string similar to The {0} enumeration value, {1}, is not supported by the .NET Framework Odbc Data Provider.. Looks up a localized string similar to Use IsDBNull when DBNull.Value data is expected.. Looks up a localized string similar to OdbcCommandBuilder.DeriveParameters failed because the OdbcCommand.CommandText property value is an invalid multipart name. Looks up a localized string similar to An internal connection does not have an owner.. Looks up a localized string similar to Invalid OdbcType enumeration value={0}.. Looks up a localized string similar to Unknown SQL type - {0}.. Looks up a localized string similar to Unknown URT type - {0}.. Looks up a localized string similar to The DataAdapter for which to automatically generate OdbcCommands. Looks up a localized string similar to The character used in a text command as the opening quote for quoting identifiers that contain special characters.. Looks up a localized string similar to The character used in a text command as the closing quote for quoting identifiers that contain special characters.. Looks up a localized string similar to Information used to connect to a Data Source.. Looks up a localized string similar to Connection string exceeds maximum allowed length of {0}.. Looks up a localized string similar to Current connection timeout value, not settable in the ConnectionString.. Looks up a localized string similar to Current data source catalog value, 'Database=X' in the connection string.. Looks up a localized string similar to Current data source, 'Server=X' in the connection string.. Looks up a localized string similar to Current ODBC driver.. Looks up a localized string similar to Version of the product accessed by the ODBC Driver.. Looks up a localized string similar to The parameter native type.. Looks up a localized string similar to 'Asynchronous Processing' is not a supported feature of the .NET Framework Data OLE DB Provider(Microsoft.Data.OleDb).. Looks up a localized string similar to Accessor validation was deferred and was performed while the method returned data. The binding was invalid for this column or parameter.. Looks up a localized string similar to Microsoft.Data.OleDb.OleDbDataAdapter internal error: invalid parameter accessor: {0} {1}.. Looks up a localized string similar to OleDbDataAdapter internal error: invalid row set accessor: Ordinal={0} Status={1}.. Looks up a localized string similar to Can not determine the server's decimal separator. Non-integer numeric literals can not be created.. Looks up a localized string similar to The data value could not be converted for reasons other than sign mismatch or data overflow. For example, the data was corrupted in the data store but the row was still retrievable.. Looks up a localized string similar to The provider could not allocate memory in which to return {0} data.. Looks up a localized string similar to Command parameter[{0}] '{1}' is invalid.. Looks up a localized string similar to Command parameter[{0}] '{1}' data value could not be converted for reasons other than sign mismatch or data overflow.. Looks up a localized string similar to Conversion failed for command parameter[{0}] '{1}' because the data value overflowed the type used by the provider.. Looks up a localized string similar to Parameter[{0}] '{1}' has no default value.. Looks up a localized string similar to Error occurred with parameter[{0}]: {1}.. Looks up a localized string similar to Conversion failed for command parameter[{0}] '{1}' because the data value was signed and the type used by the provider was unsigned.. Looks up a localized string similar to Provider encountered an error while sending command parameter[{0}] '{1}' value and stopped processing.. Looks up a localized string similar to The ICommandText interface is not supported by the '{0}' provider. Use CommandType.TableDirect instead.. Looks up a localized string similar to Unable to load the XML file specified in configuration setting '{0}'.. Looks up a localized string similar to The '{0}' configuration setting has the wrong number of values.. Looks up a localized string similar to Format of the initialization string does not conform to the OLE DB specification. Starting around char[{0}] in the connection string.. Looks up a localized string similar to Conversion failed because the {0} data value overflowed the type specified for the {0} value part in the consumer's buffer.. Looks up a localized string similar to DBTYPE_VECTOR data is not supported by the .NET Framework Data OLE DB Provider(Microsoft.Data.OleDb).. Looks up a localized string similar to IErrorInfo.GetDescription failed with {0}.. Looks up a localized string similar to IErrorInfo.GetSource failed with {0}.. Looks up a localized string similar to Unable to retrieve the IRow interface from the ADODB.Record object.. Looks up a localized string similar to Unable to retrieve the '{0}' interface from the ADODB.RecordSet object.. Looks up a localized string similar to Object is not an ADODB.RecordSet or an ADODB.Record.. Looks up a localized string similar to OleDbDataAdapter internal error: [get] Unknown OLE DB data type: 0x{0} ({1}).. Looks up a localized string similar to Cannot construct the ReservedWords schema collection because the provider does not support IDBInfo.. Looks up a localized string similar to The OLE DB Provider specified in the ConnectionString is too long.. Looks up a localized string similar to No restrictions are expected for the DbInfoKeywords OleDbSchemaGuid.. Looks up a localized string similar to No restrictions are expected for the DbInfoLiterals OleDbSchemaGuid.. Looks up a localized string similar to No restrictions are expected for the schema guid OleDbSchemaGuid.. Looks up a localized string similar to Type does not support the OLE DB interface ISourcesRowset. Looks up a localized string similar to The .NET Framework Data Providers require Microsoft Data Access Components(MDAC). Please install Microsoft Data Access Components(MDAC) version 2.6 or later.. Looks up a localized string similar to The .NET Framework OleDb Data Provider requires Microsoft Data Access Components(MDAC) version 2.6 or later. Version {0} was found currently installed.. Looks up a localized string similar to The .NET Framework Data Provider for OLEDB (Microsoft.Data.OleDb) does not support the Microsoft OLE DB Provider for ODBC Drivers (MSDASQL). Use the .NET Framework Data Provider for ODBC (System.Data.Odbc).. Looks up a localized string similar to No error message available, result code: {0}.. Looks up a localized string similar to '{0}' failed with no error message available, result code: {1}.. Looks up a localized string similar to Unspecified error: {0}. Looks up a localized string similar to An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.. Looks up a localized string similar to The ICommandWithParameters interface is not supported by the '{0}' provider. Command parameters are unsupported with the current provider.. Looks up a localized string similar to Retrieving procedure parameter information is not supported by the '{0}' provider.. Looks up a localized string similar to The {0} enumeration value, {1}, is not supported by the .NET Framework OleDb Data Provider.. Looks up a localized string similar to The {0} OleDbSchemaGuid is not a supported schema by the '{1}' provider.. Looks up a localized string similar to OleDbCommandBuilder.DeriveParameters failed because the OleDbCommandBuilder.CommandText property value is an invalid multipart name. Looks up a localized string similar to The .NET Framework Data Provider for OLEDB will not allow the OLE DB Provider to prompt the user in a non-interactive environment.. Looks up a localized string similar to The ColumnID element was invalid.. Looks up a localized string similar to The value of Options was invalid.. Looks up a localized string similar to Failed to initialize the '{0}' property for one of the following reasons: The value data type was not the data type of the property or was not null. For example, the property was DBPROP_MEMORYUSAGE, which has a data type of Int32, and the data type was Int64. The value was not a valid value. For example, the property was DBPROP_MEMORYUSAGE and the value was negative. The value was a valid value for the property and the provider supports the property as a settable property, but the provider does not su [rest of string was truncated]";. Looks up a localized string similar to The '{0}'property's value was not set because doing so would have conflicted with an existing property.. Looks up a localized string similar to A '{0}' property was specified to be applied to all columns but could not be applied to one or more of them.. Looks up a localized string similar to (Reserved).. Looks up a localized string similar to The optional '{0}' property's value was not set to the specified value and setting the property to the specified value was not possible.. Looks up a localized string similar to The '{0}' property was read-only, or the consumer attempted to set values of properties in the Initialization property group after the data source object was initialized. Consumers can set the value of a read-only property to its current value. This status is also returned if a settable column property could not be set for the particular column.. Looks up a localized string similar to The property's value was not set because the provider did not support the '{0}' property, or the consumer attempted to get or set values of properties not in the Initialization property group and the data source object is uninitialized.. Looks up a localized string similar to The provider returned an unknown DBPROPSTATUS_ value '{0}'.. Looks up a localized string similar to The '{0}' provider is not registered on the local machine.. Looks up a localized string similar to '{0}' interface is not supported by the '{1}' provider. GetOleDbSchemaTable is unavailable with the current provider.. Looks up a localized string similar to Conversion failed because the {0} data value was signed and the type specified for the {0} value part in the consumer's buffer was unsigned.. Looks up a localized string similar to OleDbDataAdapter internal error: [set] Unknown OLE DB data type: 0x{0} ({1}).. Looks up a localized string similar to The OleDbDataReader.Read must be used from the same thread on which is was created if that thread's ApartmentState was not ApartmentState.MTA.. Looks up a localized string similar to The ITransactionLocal interface is not supported by the '{0}' provider. Local transactions are unavailable with the current provider.. Looks up a localized string similar to The provider could not determine the {0} value. For example, the row was just created, the default for the {0} column was not available, and the consumer had not yet set a new {0} value.. Looks up a localized string similar to OLE DB Provider returned an unexpected status value of {0}.. Looks up a localized string similar to Parameter[{0}]: the OleDbType property is uninitialized: OleDbType.{1}.. Looks up a localized string similar to The DataAdapter for which to automatically generate OleDbCommands. Looks up a localized string similar to The decimal separator used in numeric literals.. Looks up a localized string similar to The prefix string wrapped around sql objects. Looks up a localized string similar to The suffix string wrapped around sql objects. Looks up a localized string similar to Information used to connect to a Data Source.. Looks up a localized string similar to Current connection timeout value, 'Connect Timeout=X' in the ConnectionString.. Looks up a localized string similar to Current data source catalog value, 'Initial Catalog=X' in the connection string.. Looks up a localized string similar to Current data source, 'Data Source=X' in the connection string.. Looks up a localized string similar to Current OLE DB provider ProgID, 'Provider=X' in the connection string.. Looks up a localized string similar to Version of the product accessed by the OLE DB Provider.. Looks up a localized string similar to The parameter native type.. Looks up a localized string similar to Occurs whenever a property for this control changes.. Looks up a localized string similar to Min ({0}) must be less than or equal to max ({1}) in a Range object.. Looks up a localized string similar to This is a null range.. Looks up a localized string similar to Collection was modified; enumeration operation might not execute.. Looks up a localized string similar to DataTable internal index is corrupted: '{0}'.. Looks up a localized string similar to MinimumCapacity must be non-negative.. Looks up a localized string similar to Security Warning: The negotiated {0} is an insecure protocol and is supported for backward compatibility only. The recommended protocol version is TLS 1.2 and later.. Looks up a localized string similar to I/O Error detected in read/write operation. Looks up a localized string similar to . Looks up a localized string similar to Timeout error. Looks up a localized string similar to No server name supplied. Looks up a localized string similar to TerminateListener() has been called. Looks up a localized string similar to Win9x not supported. Looks up a localized string similar to Function not supported. Looks up a localized string similar to Shared-Memory heap error. Looks up a localized string similar to Cannot find an ip/ipv6 type address to connect. Looks up a localized string similar to Connection has been closed by peer. Looks up a localized string similar to Physical connection is not usable. Looks up a localized string similar to Connection was terminated. Looks up a localized string similar to Connection has been closed. Looks up a localized string similar to Encryption is enforced but there is no valid certificate. Looks up a localized string similar to Couldn't load library. Looks up a localized string similar to Cannot open a new thread in server process. Looks up a localized string similar to Cannot post event to completion port. Looks up a localized string similar to Connection string is not valid. Looks up a localized string similar to Error Locating Server/Instance Specified. Looks up a localized string similar to Error getting enabled protocols list from registry. Looks up a localized string similar to Server doesn't support requested protocol. Looks up a localized string similar to Shared Memory is not supported for clustered server connectivity. Looks up a localized string similar to Asynchronous operations not supported. Looks up a localized string similar to Invalid attempt bind to shared memory segment. Looks up a localized string similar to Encryption(ssl/tls) handshake failed. Looks up a localized string similar to Packet size too large for SSL Encrypt/Decrypt operations. Looks up a localized string similar to SSRP error. Looks up a localized string similar to Could not connect to the Shared Memory pipe. Looks up a localized string similar to An internal exception was caught. Looks up a localized string similar to The Shared Memory dll used to connect to SQL Server 2000 was not found. Looks up a localized string similar to The SQL Server 2000 Shared Memory client dll appears to be invalid/corrupted. Looks up a localized string similar to Cannot open a Shared Memory connection to SQL Server 2000. Looks up a localized string similar to Shared memory connectivity to SQL Server 2000 is either disabled or not available on this machine. Looks up a localized string similar to . Looks up a localized string similar to Could not open a connection to SQL Server. Looks up a localized string similar to Cannot open a Shared Memory connection to a remote SQL server. Looks up a localized string similar to Could not establish dedicated administrator connection (DAC) on default port. Make sure that DAC is enabled. Looks up a localized string similar to An error occurred while obtaining the dedicated administrator connection (DAC) port. Make sure that SQL Browser is running, or check the error log for the port number. Looks up a localized string similar to Could not compose Service Principal Name (SPN) for Windows Integrated Authentication. Possible causes are server(s) incorrectly specified to connection API calls, Domain Name System (DNS) lookup failure or memory shortage. Looks up a localized string similar to Connecting with the MultiSubnetFailover connection option to a SQL Server instance configured with more than 64 IP addresses is not supported.. Looks up a localized string similar to Connecting to a named SQL Server instance using the MultiSubnetFailover connection option is not supported.. Looks up a localized string similar to Connecting to a SQL Server instance using the MultiSubnetFailover connection option is only supported when using the TCP protocol.. Looks up a localized string similar to Invalid parameter(s) found. Looks up a localized string similar to Local Database Runtime error occurred. . Looks up a localized string similar to An instance name was not specified while connecting to a Local Database Runtime. Specify an instance name in the format (localdb)\instance_name.. Looks up a localized string similar to Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.. Looks up a localized string similar to Invalid Local Database Runtime registry configuration found. Verify that SQL Server Express is properly installed.. Looks up a localized string similar to Unable to locate the registry entry for SQLUserInstance.dll file path. Verify that the Local Database Runtime feature of SQL Server Express is properly installed.. Looks up a localized string similar to Registry value contains an invalid SQLUserInstance.dll file path. Verify that the Local Database Runtime feature of SQL Server Express is properly installed.. Looks up a localized string similar to Unable to load the SQLUserInstance.dll from the location specified in the registry. Verify that the Local Database Runtime feature of SQL Server Express is properly installed.. Looks up a localized string similar to Invalid SQLUserInstance.dll found at the location specified in the registry. Verify that the Local Database Runtime feature of SQL Server Express is properly installed.. Looks up a localized string similar to Unsupported protocol specified. Looks up a localized string similar to Invalid connection found when setting up new session protocol. Looks up a localized string similar to Protocol not supported. Looks up a localized string similar to Associating port with I/O completion mechanism failed. Looks up a localized string similar to Incorrect physicalConnection type.. Looks up a localized string similar to The '{0}' platform is not supported when targeting .NET Framework.. Looks up a localized string similar to HTTP Provider. Looks up a localized string similar to Named Pipes Provider. Looks up a localized string similar to . Looks up a localized string similar to SQL Network Interfaces. Looks up a localized string similar to Session Provider. Looks up a localized string similar to Sign Provider. Looks up a localized string similar to Shared Memory Provider. Looks up a localized string similar to SMux Provider. Looks up a localized string similar to SSL Provider. Looks up a localized string similar to TCP Provider. Looks up a localized string similar to VIA Provider. Looks up a localized string similar to CTAIP Provider. Looks up a localized string similar to Connection open and login was successful, but then an error occurred while enlisting the connection into the current distributed transaction.. Looks up a localized string similar to A transport-level error has occurred during connection clean-up.. Looks up a localized string similar to A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.. Looks up a localized string similar to Connection open and login was successful, but then an error occurred while enabling MARS for this connection.. Looks up a localized string similar to A transport-level error has occurred when sending the request to the server.. Looks up a localized string similar to Failed to establish a MARS session in preparation to send the request to the server.. Looks up a localized string similar to A connection was successfully established with the server, but then an error occurred during the login process.. Looks up a localized string similar to A connection was successfully established with the server, but then an error occurred when obtaining the security/SSPI context information for integrated security login.. Looks up a localized string similar to A connection was successfully established with the server, but then an error occurred during the pre-login handshake.. Looks up a localized string similar to The client was unable to establish a connection because of an error during connection initialization process before login. Possible causes include the following: the client tried to connect to an unsupported version of SQL Server; the server was too busy to accept new connections; or there was a resource limitation (insufficient memory or maximum allowed connections) on the server.. Looks up a localized string similar to A transport-level error has occurred during SSPI handshake.. Looks up a localized string similar to A transport-level error has occurred when receiving results from the server.. Looks up a localized string similar to A transport-level error has occurred while sending information to the server.. Looks up a localized string similar to The length of '{0}' must match the length of '{1}'.. Looks up a localized string similar to This command requires an asynchronous connection. Set "Asynchronous Processing=true" in the connection string.. Looks up a localized string similar to The asynchronous operation has already completed.. Looks up a localized string similar to Cannot use 'Authentication' with 'Integrated Security'.. Looks up a localized string similar to Batching updates is not supported on the context connection.. Looks up a localized string similar to SqlBulkCopy.WriteToServer failed because the SqlBulkCopy.DestinationTableName is an invalid multipart name. Looks up a localized string similar to The given value{0} of type {1} from the data source cannot be converted to type {2} for Column {3} [{4}] Row {5}.. Looks up a localized string similar to The given value{0} of type {1} from the data source cannot be converted to type {2} for Column {3} [{4}].. Looks up a localized string similar to Must not specify SqlBulkCopyOption.UseInternalTransaction and pass an external Transaction at the same time.. Looks up a localized string similar to Unexpected existing transaction.. Looks up a localized string similar to Cannot access destination table '{0}'.. Looks up a localized string similar to Function must not be called during event.. Looks up a localized string similar to The given column order hint is not valid.. Looks up a localized string similar to Timeout Value '{0}' is less than 0.. Looks up a localized string similar to Value cannot be converted to SqlVariant.. Looks up a localized string similar to The locale id '{0}' of the source column '{1}' and the locale id '{2}' of the destination column '{3}' do not match.. Looks up a localized string similar to The mapped collection is in use and cannot be accessed at this time;. Looks up a localized string similar to Mappings must be either all name or all ordinal based.. Looks up a localized string similar to The DestinationTableName property must be set before calling this method.. Looks up a localized string similar to Failed to obtain column collation information for the destination table. If the table is not in the current database the name must be qualified using the database name (e.g. [mydb]..[mytable](e.g. [mydb]..[mytable]); this also applies to temporary-tables (e.g. #mytable would be specified as tempdb..#mytable).. Looks up a localized string similar to The given ColumnMapping does not match up with any column in the source or destination.. Looks up a localized string similar to The given ColumnName '{0}' does not match up with any column in data source.. Looks up a localized string similar to Column '{0}' does not allow DBNull.Value.. Looks up a localized string similar to The column '{0}' was specified more than once.. Looks up a localized string similar to The sorted column '{0}' is not valid in the destination table.. Looks up a localized string similar to Attempt to invoke bulk copy on an object that has a pending operation.. Looks up a localized string similar to String or binary data would be truncated in table '{0}', column '{1}'. Truncated value: '{2}'.. Looks up a localized string similar to A column order hint cannot have an unspecified sort order.. Looks up a localized string similar to Failed to instantiate a SqlAuthenticationInitializer with type '{0}'.. Looks up a localized string similar to Failed to instantiate an authentication provider with type '{1}' for '{0}'.. Looks up a localized string similar to Cannot create normalizer for '{0}'.. Looks up a localized string similar to Cannot find an authentication provider for '{0}'.. Looks up a localized string similar to Failed to read the config section for authentication providers.. Looks up a localized string similar to Unable to get the address of the distributed transaction coordinator for the server, from the server. Is DTC enabled on the server?. Looks up a localized string similar to The provider '{0}' threw an exception while initializing.. Looks up a localized string similar to {0} cannot be changed while async operation is in progress.. Looks up a localized string similar to Incorrect authentication parameters specified with certificate authentication.. Looks up a localized string similar to The '{0}' argument must not be null or empty.. Looks up a localized string similar to ChangePassword can only be used with SQL authentication, not with integrated security.. Looks up a localized string similar to ChangePassword requires SQL Server 9.0 or later.. Looks up a localized string similar to The keyword '{0}' must not be specified in the connectionString argument to ChangePassword.. Looks up a localized string similar to The requested operation cannot be completed because the connection has been broken.. Looks up a localized string similar to The connection cannot be used because there is an ongoing operation that must be finished.. Looks up a localized string similar to The only additional connection string keyword that may be used when requesting the context connection is the Type System Version keyword.. Looks up a localized string similar to The context connection does not support Type System Version=SQL Server 2000.. Looks up a localized string similar to The context connection is already in use.. Looks up a localized string similar to The requested operation requires a SqlClr context, which is only available when running in the Sql Server process.. Looks up a localized string similar to The requested operation requires a Sql Server execution thread. The current thread was started by user code or other non-Sql Server engine code.. Looks up a localized string similar to Either Credential or both 'User ID' and 'Password' (or 'UID' and 'PWD') connection string keywords must be specified, if 'Authentication={0}'.. Looks up a localized string similar to The instance of SQL Server you attempted to connect to does not support CTAIP.. Looks up a localized string similar to The Collation specified by SQL Server is not supported.. Looks up a localized string similar to Type {0} is not supported on this platform.. Looks up a localized string similar to Cannot use 'Authentication=Active Directory Device Code Flow' with 'User ID', 'UID', 'Password' or 'PWD' connection string keywords.. Looks up a localized string similar to The duration spent while attempting to connect to this server was - [Pre-Login] initialization={0}; handshake={1}; [Login] initialization={2}; . Looks up a localized string similar to The duration spent while attempting to connect to this server was - [Pre-Login] initialization={0}; handshake={1}; [Login] initialization={2}; authentication={3}; . Looks up a localized string similar to The duration spent while attempting to connect to this server was - [Pre-Login] initialization={0}; handshake={1}; [Login] initialization={2}; authentication={3}; [Post-Login] complete={4}; . Looks up a localized string similar to The duration spent while attempting to connect to this server was - [Pre-Login] initialization={0};. Looks up a localized string similar to The duration spent while attempting to connect to this server was - [Pre-Login] initialization={0}; handshake={1}; . Looks up a localized string similar to The instance of SQL Server you attempted to connect to requires encryption but this machine does not support it.. Looks up a localized string similar to The instance of SQL Server you attempted to connect to does not support encryption.. Looks up a localized string similar to Number of fields in record '{0}' does not match the number in the original record.. Looks up a localized string similar to Metadata for field '{0}' of record '{1}' did not match the original record's metadata.. Looks up a localized string similar to Specified data length {0} exceeds the allowed maximum length of {1}.. Looks up a localized string similar to ClientConnectionId:{0}. Looks up a localized string similar to Error Number:{0},State:{1},Class:{2}. Looks up a localized string similar to ClientConnectionId before routing:{0}. Looks up a localized string similar to Routing Destination:{0}. Looks up a localized string similar to Timeout expired. The connection has been broken as a result.. Looks up a localized string similar to Globalization Invariant Mode is not supported.. Looks up a localized string similar to Instance failure.. Looks up a localized string similar to Cannot use 'Authentication=Active Directory Integrated' with 'Password' or 'PWD' connection string keywords.. Looks up a localized string similar to Cannot use 'Authentication=Active Directory Interactive' with 'Password' or 'PWD' connection string keywords.. Looks up a localized string similar to Internal Error. Looks up a localized string similar to Buffer offset '{1}' plus the bytes available '{0}' is greater than the length of the passed in buffer.. Looks up a localized string similar to Data length '{0}' is less than 0.. Looks up a localized string similar to Invalid internal packet size:. Looks up a localized string similar to The length of the value for the connection parameter <{0}> exceeds the maximum allowed 65535 characters.. Looks up a localized string similar to Invalid 'Packet Size'. The value must be an integer >= 512 and <= 32768.. Looks up a localized string similar to The length of the parameter '{0}' exceeds the limit of 128 characters.. Looks up a localized string similar to Invalid 3 part name format for TypeName.. Looks up a localized string similar to Server {0}, database {1} is not configured for database mirroring.. Looks up a localized string similar to Invalid attempt to read when no data is present.. Looks up a localized string similar to The server certificate failed application validation.. Looks up a localized string similar to The SqlDbType '{0}' is invalid for {1}. Only {2} is supported.. Looks up a localized string similar to Unsupported SQL Server version. The .NET Framework SqlClient Data Provider can only be used with SQL Server versions 7.0 and later.. Looks up a localized string similar to Invalid SSPI packet size.. Looks up a localized string similar to Invalid Packet Size.. Looks up a localized string similar to The SQL Server instance returned an invalid or unsupported protocol version during login negotiation.. Looks up a localized string similar to Invalid 3 part name format for UdtTypeName.. Looks up a localized string similar to Cannot authenticate using Kerberos. Ensure Kerberos has been initialized on the client with 'kinit' and a Service Principal Name has been registered for the SQL Server to allow Kerberos authentication.. Looks up a localized string similar to The connection does not support MultipleActiveResultSets.. Looks up a localized string similar to MetaData parameter array must have length equivalent to ParameterDirection array argument.. Looks up a localized string similar to SqlDbType.SmallMoney overflow. Value '{0}' is out of range. Must be between -214,748.3648 and 214,748.3647.. Looks up a localized string similar to Failed to authenticate the user {0} in Active Directory (Authentication={1}).. Looks up a localized string similar to Error code 0x{0}. Looks up a localized string similar to Nested TransactionScopes are not supported.. Looks up a localized string similar to The keyword 'Network Library' is not supported on this platform, prefix the 'Data Source' with the protocol desired instead ('tcp:' for a TCP connection, or 'np:' for a Named Pipe connection).. Looks up a localized string similar to Invalid attempt to GetBytes on column '{0}'. The GetBytes function can only be used on columns of type Text, NText, or Image.. Looks up a localized string similar to Invalid attempt to GetChars on column '{0}'. The GetChars function can only be used on columns of type Text, NText, Xml, VarChar or NVarChar.. Looks up a localized string similar to Cannot use 'Authentication={0}' with 'Password' or 'PWD' connection string keywords.. Looks up a localized string similar to SSE Instance re-direction is not supported for non-local user instances.. Looks up a localized string similar to Invalid command sent to ExecuteXmlReader. The command must return an Xml result.. Looks up a localized string similar to The requested operation is not available on the context connection.. Looks up a localized string similar to Notifications are not available on the context connection.. Looks up a localized string similar to Notifications require SQL Server 9.0 or later.. Looks up a localized string similar to The {0} enumeration value, {1}, is not supported by the .NET Framework SqlClient Data Provider.. Looks up a localized string similar to Command parameter must have a non null and non empty command text.. Looks up a localized string similar to Invalid transaction or invalid name for a point at which to save within the transaction.. Looks up a localized string similar to Open result count exceeded.. Looks up a localized string similar to Operation cancelled by user.. Looks up a localized string similar to Parameter '{0}' cannot be null or empty.. Looks up a localized string similar to Parameter '{0}' cannot have Direction Output or InputOutput when EnableOptimizedParameterBinding is enabled on the parent command.. Looks up a localized string similar to Parameter '{0}' exceeds the size limit for the sql_variant datatype.. Looks up a localized string similar to The {0} type parameter '{1}' must have a valid type name.. Looks up a localized string similar to Internal connection fatal error.. Looks up a localized string similar to Internal connection fatal error. Error state: {0}, Authentication Library Type: {1}. Looks up a localized string similar to Internal connection fatal error. Error state: {0}, Feature Id: {1}. Looks up a localized string similar to Internal connection fatal error. Error state: {0}, Length: {1}. Looks up a localized string similar to Internal connection fatal error. Error state: {0}, Offset: {1}. Looks up a localized string similar to Internal connection fatal error. Error state: {0}, Status: {1}. Looks up a localized string similar to Internal connection fatal error. Error state: {0}, Token : {1}. Looks up a localized string similar to Internal connection fatal error. Error state: {0}, Value: {1}. Looks up a localized string similar to Internal connection fatal error. Error state: {0}. Looks up a localized string similar to The command execution cannot proceed due to a pending asynchronous operation already in progress.. Looks up a localized string similar to An error occurred with a prior row sent to the SqlPipe. SendResultsEnd must be called before anything else can be sent.. Looks up a localized string similar to Precision value '{0}' is either less than 0 or greater than the maximum allowed precision of 38.. Looks up a localized string similar to Certificate failed chain validation. Error(s): '{0}'.. Looks up a localized string similar to Certificate name mismatch. The provided 'DataSource' or 'HostNameInCertificate' does not match the name in the certificate.. Looks up a localized string similar to Certificate not available while validating the certificate.. Looks up a localized string similar to Scale value '{0}' is either less than 0 or greater than the maximum allowed scale of 38.. Looks up a localized string similar to Cannot set the Credential property if 'Authentication=Active Directory Device Code Flow' has been specified in the connection string.. Looks up a localized string similar to Cannot set the Credential property if 'Authentication=Active Directory Integrated' has been specified in the connection string.. Looks up a localized string similar to Cannot set the Credential property if 'Authentication=Active Directory Interactive' has been specified in the connection string.. Looks up a localized string similar to Cannot set the Credential property if 'Authentication={0}' has been specified in the connection string.. Looks up a localized string similar to Cannot use 'Authentication=Active Directory Device Code Flow', if the Credential property has been set.. Looks up a localized string similar to Cannot use 'Authentication=Active Directory Integrated', if the Credential property has been set.. Looks up a localized string similar to Cannot use 'Authentication=Active Directory Interactive', if the Credential property has been set.. Looks up a localized string similar to Cannot use 'Authentication={0}', if the Credential property has been set.. Looks up a localized string similar to A severe error occurred on the current command. The results, if any, should be discarded.. Looks up a localized string similar to SqlDbType.SmallDateTime overflow. Value '{0}' is out of range. Must be between 1/1/1900 12:00:00 AM and 6/6/2079 11:59:59 PM.. Looks up a localized string similar to The {0} enumeration value, {1}, is not supported by SQL Server 7.0 or SQL Server 2000.. Looks up a localized string similar to Memory allocation for internal connection failed.. Looks up a localized string similar to Socket did not throw expected '{0}' with error code '{1}'.. Looks up a localized string similar to SqlCommand.DeriveParameters failed because the SqlCommand.CommandText property value is an invalid multipart name. Looks up a localized string similar to '{0}' cannot be called when the record is read only.. Looks up a localized string similar to Operation cannot be completed because the record is read only.. Looks up a localized string similar to Invalid attempt to call method {0} when SqlResultSet is closed.. Looks up a localized string similar to Operation cannot be completed because the SqlResultSet is closed.. Looks up a localized string similar to Operation cannot be completed because the command that created the SqlResultSet has been dissociated from the original connection. SqlResultSet is closed.. Looks up a localized string similar to SqlResultSet could not be created for the given query with the desired options.. Looks up a localized string similar to Invalid attempt to call method {0} when the current row is deleted. Looks up a localized string similar to Operation cannot be completed because the current row is deleted. Looks up a localized string similar to '{0}' cannot be called when the SqlDataRecord is read only.. Looks up a localized string similar to The target principal name is incorrect. Cannot generate SSPI context.. Looks up a localized string similar to Cannot initialize SSPI package.. Looks up a localized string similar to Invalid attempt to GetStream on column '{0}'. The GetStream function can only be used on columns of type Binary, Image, Udt or VarBinary.. Looks up a localized string similar to The Stream does not support reading.. Looks up a localized string similar to The Stream does not support seeking.. Looks up a localized string similar to The Stream does not support writing.. Looks up a localized string similar to Not supported in .Net Standard 2.0.. Looks up a localized string similar to Processing of results from SQL Server failed because of an invalid multipart name. Looks up a localized string similar to Invalid attempt to GetTextReader on column '{0}'. The GetTextReader function can only be used on columns of type Char, NChar, NText, NVarChar, Text or VarChar.. Looks up a localized string similar to Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.. Looks up a localized string similar to Active Directory Device Code Flow authentication timed out. The user took too long to respond to the authentication request.. Looks up a localized string similar to Active Directory Interactive authentication timed out. The user took too long to respond to the authentication request.. Looks up a localized string similar to Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.. Looks up a localized string similar to This failure occurred while attempting to connect to the {0} server.. Looks up a localized string similar to Connection Timeout Expired. The timeout period elapsed at the start of the login phase. This could be because of insufficient time provided for connection timeout.. Looks up a localized string similar to Connection Timeout Expired. The timeout period elapsed while attempting to authenticate the login. This could be because the server failed to authenticate the user or the server was unable to respond back in time.. Looks up a localized string similar to Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections.. Looks up a localized string similar to Connection Timeout Expired. The timeout period elapsed at the start of the pre-login phase. This could be because of insufficient time provided for connection timeout.. Looks up a localized string similar to Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time.. Looks up a localized string similar to Connection Timeout Expired. The timeout period elapsed while attempting to create and initialize a socket to the server. This could be either because the server was unreachable or unable to respond back in time.. Looks up a localized string similar to Connection Timeout Expired. The timeout period elapsed while making a pre-login handshake request. This could be because the server was unable to respond back in time.. Looks up a localized string similar to This failure occurred while attempting to connect to the routing destination. The duration spent while attempting to connect to the original server was - [Pre-Login] initialization={0}; handshake={1}; [Login] initialization={2}; authentication={3}; [Post-Login] complete={4}; . Looks up a localized string similar to SqlDbType.Time overflow. Value '{0}' is out of range. Must be between 00:00:00.0000000 and 23:59:59.9999999.. Looks up a localized string similar to Scale value '{0}' is either less than 0 or greater than the maximum allowed scale of 7.. Looks up a localized string similar to Too many values.. Looks up a localized string similar to SqlParameter.TypeName is an invalid multipart name. Looks up a localized string similar to SqlParameter.UdtTypeName is an invalid multipart name. Looks up a localized string similar to Unexpected server event: {0}.. Looks up a localized string similar to Unrecognized System.Transactions.IsolationLevel enumeration value: {0}.. Looks up a localized string similar to The authentication '{0}' is not supported.. Looks up a localized string similar to The provider '{0}' does not support authentication '{1}'.. Looks up a localized string similar to Unsupported authentication specified in this context: {0}. Looks up a localized string similar to The server is attempting to use a feature that is not supported on this platform.. Looks up a localized string similar to The keyword '{0}' is not supported on this platform.. Looks up a localized string similar to SQL authentication method '{0}' is not supported.. Looks up a localized string similar to The currently loaded System.Transactions.dll does not support Global Transactions.. Looks up a localized string similar to Received an unsupported token '{0}' while reading data from the server.. Looks up a localized string similar to User Instance and Failover are not compatible options. Please choose only one of the two in the connection string.. Looks up a localized string similar to A user instance was requested in the connection string but the server specified does not support this option.. Looks up a localized string similar to User instances are not allowed when running in the Sql Server process.. Looks up a localized string similar to Expecting argument of type {1}, but received type {0}.. Looks up a localized string similar to Invalid attempt to GetXmlReader on column '{0}'. The GetXmlReader function can only be used on columns of type Xml.. Looks up a localized string similar to Exception occurred while trying to set the AppContext Switch '{0}'={1}.. Looks up a localized string similar to Notification values used by Microsoft SQL Server.. Looks up a localized string similar to Automatic enlistment in notifications used by Microsoft SQL Server.. Looks up a localized string similar to The DataAdapter for which to automatically generate SqlCommands. Looks up a localized string similar to The decimal separator used in numeric literals.. Looks up a localized string similar to The character used in a text command as the opening quote for quoting identifiers that contain special characters.. Looks up a localized string similar to The character used in a text command as the closing quote for quoting identifiers that contain special characters.. Looks up a localized string similar to Access token to use for authentication.. Looks up a localized string similar to State of connection, synchronous or asynchronous. 'Asynchronous Processing=x' in the connection string.. Looks up a localized string similar to A guid to represent the physical connection.. Looks up a localized string similar to Information used to connect to a DataSource, such as 'Data Source=x;Initial Catalog=x;Integrated Security=SSPI'.. Looks up a localized string similar to Current connection timeout value, 'Connect Timeout=X' in the ConnectionString.. Looks up a localized string similar to User Id and secure password to use for authentication.. Looks up a localized string similar to Custom column encryption key store providers.. Looks up a localized string similar to Current SQL Server database, 'Initial Catalog=X' in the connection string.. Looks up a localized string similar to Current SqlServer that the connection is opened to, 'Data Source=X' in the connection string.. Looks up a localized string similar to Network packet size, 'Packet Size=x' in the connection string.. Looks up a localized string similar to Information used to connect for replication.. Looks up a localized string similar to Server Process Id (SPID) of the active connection.. Looks up a localized string similar to Version of the SQL Server accessed by the SqlConnection.. Looks up a localized string similar to Collect statistics for this connection.. Looks up a localized string similar to Workstation Id, 'Workstation ID=x' in the connection string.. Looks up a localized string similar to Cannot convert object of type '{0}' to object of type '{1}'.. Looks up a localized string similar to The connection is broken and recovery is not possible. The client driver attempted to recover the connection one or more times and all attempts failed. Increase the value of ConnectRetryCount to increase the number of recovery attempts.. Looks up a localized string similar to The server did not preserve SSL encryption during a recovery attempt, connection recovery is not possible.. Looks up a localized string similar to Invalid ConnectRetryCount value (should be 0-255).. Looks up a localized string similar to Invalid ConnectRetryInterval value (should be 1-60).. Looks up a localized string similar to Next reconnection attempt will exceed query timeout. Reconnection was terminated.. Looks up a localized string similar to The server did not acknowledge a recovery attempt, connection recovery is not possible.. Looks up a localized string similar to The server did not preserve the exact client TDS version requested during a recovery attempt, connection recovery is not possible.. Looks up a localized string similar to The connection is broken and recovery is not possible. The connection is marked by the client driver as unrecoverable. No attempt was made to restore the connection.. Looks up a localized string similar to The connection is broken and recovery is not possible. The connection is marked by the server as unrecoverable. No attempt was made to restore the connection.. Looks up a localized string similar to Failure while attempting to promote transaction.. Looks up a localized string similar to To add a command to existing dependency object.. Looks up a localized string similar to The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported. Please enable the Service Broker for this database if you wish to use notifications.. Looks up a localized string similar to When using SqlDependency without providing an options value, SqlDependency.Start() must be called prior to execution of a command added to the SqlDependency instance.. Looks up a localized string similar to Command is already associated with another dependency object. Can not overwrite.. Looks up a localized string similar to SqlDependency does not support calling Start() with different connection strings having the same server, user, and database in the same app domain.. Looks up a localized string similar to SqlDependency.OnChange does not support multiple event registrations for the same delegate.. Looks up a localized string similar to Property to indicate if this dependency is invalid.. Looks up a localized string similar to A string that uniquely identifies this dependency object.. Looks up a localized string similar to No SqlDependency exists for the key.. Looks up a localized string similar to Timeout specified is invalid. Timeout cannot be < 0.. Looks up a localized string similar to SqlDependency.Start has been called for the server the command is executing against more than once, but there is no matching server/user/database Start() call for current command.. Looks up a localized string similar to When using SqlDependency without providing an options value, SqlDependency.Start() must be called for each server that is being executed against.. Looks up a localized string similar to Event that can be used to subscribe for change notifications.. Looks up a localized string similar to Dependency object used to receive query notifications.. Looks up a localized string similar to Unexpected type detected on deserialize.. Looks up a localized string similar to The process cannot access the file specified because it has been opened in another transaction.. Looks up a localized string similar to An invalid parameter was passed to the function.. Looks up a localized string similar to The path name is not valid.. Looks up a localized string similar to SqlFileStream is not supported on this platform.. Looks up a localized string similar to The path name is invalid or does not point to a disk file.. Looks up a localized string similar to The dbType {0} is invalid for this constructor.. Looks up a localized string similar to The name is too long.. Looks up a localized string similar to GetMetaData is not valid for this SqlDbType.. Looks up a localized string similar to The sort order and ordinal must either both be specified, or neither should be specified (SortOrder.Unspecified and -1). The values given were: order = {0}, ordinal = {1}.. Looks up a localized string similar to SQL Type has already been loaded with data.. Looks up a localized string similar to Arithmetic Overflow.. Looks up a localized string similar to The buffer is insufficient. Read or write operation failed.. Looks up a localized string similar to Invalid attempt to access a closed XmlReader.. Looks up a localized string similar to Two strings to be compared have different collation.. Looks up a localized string similar to Two strings to be concatenated have different collation.. Looks up a localized string similar to Conversion overflows.. Looks up a localized string similar to SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.. Looks up a localized string similar to Divide by zero error encountered.. Looks up a localized string similar to The input wasn't in a correct format.. Looks up a localized string similar to Invalid array size.. Looks up a localized string similar to Invalid SqlDateTime.. Looks up a localized string similar to Argument to GetDayOfWeek must be integer between 1 and 7.. Looks up a localized string similar to Invalid flag value.. Looks up a localized string similar to Invalid attempt to call {0} when the stream is closed.. Looks up a localized string similar to Invalid attempt to call {0} when the stream non-readable.. Looks up a localized string similar to Invalid attempt to call {0} when the stream is non-seekable.. Looks up a localized string similar to Invalid attempt to call {0} when the stream non-writable.. Looks up a localized string similar to Invalid numeric precision/scale.. Looks up a localized string similar to The SqlBytes and SqlChars don't support length of more than 2GB in this version.. Looks up a localized string similar to Message. Looks up a localized string similar to There is no buffer. Read or write operation failed.. Looks up a localized string similar to SQL Type has not been loaded with data.. Looks up a localized string similar to Null. Looks up a localized string similar to Data is Null. This method or property cannot be called on Null values.. Looks up a localized string similar to Conversion from SqlDecimal to Decimal overflows.. Looks up a localized string similar to Cannot set to non-zero length, because current value is Null.. Looks up a localized string similar to SqlType error.. Looks up a localized string similar to Stream has been closed or disposed.. Looks up a localized string similar to An error occurred while reading.. Looks up a localized string similar to Subclass did not override a required method.. Looks up a localized string similar to A time zone was specified. SqlDateTime does not support time zones.. Looks up a localized string similar to Data returned is larger than 2Gb in size. Use SequentialAccess command behavior in order to get all of the data.. Looks up a localized string similar to Numeric arithmetic causes truncation.. Looks up a localized string similar to Cannot write to non-zero offset, because current value is Null.. Looks up a localized string similar to Cannot write from an offset that is larger than current length. It would leave uninitialized data in the buffer.. Looks up a localized string similar to Connecting to a mirrored SQL Server instance using the MultiSubnetFailover connection option is not supported.. Looks up a localized string similar to This SqlCommand object is already associated with another SqlDependency object.. Looks up a localized string similar to Notification Error. Type={0}, Info={1}, Source={2}.. Looks up a localized string similar to SqlDependency object cannot be created when running inside the SQL Server process.. Looks up a localized string similar to DBNull value for parameter '{0}' is not supported. Table-valued parameters cannot be DBNull.. Looks up a localized string similar to Precision '{0}' required to send all values in column '{1}' exceeds the maximum supported precision '{2}'. The values must all fit in a single precision.. Looks up a localized string similar to Offset in variable length data types.. Looks up a localized string similar to Name of the parameter, like '@p1'. Looks up a localized string similar to When used by DataAdapter.Update, the parameter value is changed from DBNull.Value into (Int32)1 or (Int32)0 if non-null.. Looks up a localized string similar to The parameter native type.. Looks up a localized string similar to The server's name for the type.. Looks up a localized string similar to TypeName specified for parameter '{0}'. TypeName must only be set for Structured parameters.. Looks up a localized string similar to ParameterDirection '{0}' specified for parameter '{1}' is not supported. Table-valued parameters only support ParameterDirection.Input.. Looks up a localized string similar to XmlSchemaCollectionDatabase. Looks up a localized string similar to XmlSchemaCollectionName. Looks up a localized string similar to XmlSchemaCollectionOwningSchema. Looks up a localized string similar to A result set is currently being sent to the pipe. End the current result set before calling {0}.. Looks up a localized string similar to SqlPipe does not support executing a command with a connection that is not a context connection.. Looks up a localized string similar to Result set has not been initiated. Call SendResultSetStart before calling {0}.. Looks up a localized string similar to Could not use the pipe while it is busy with another operation.. Looks up a localized string similar to Message length {0} exceeds maximum length supported of 4000.. Looks up a localized string similar to The sort ordinal {0} was specified twice.. Looks up a localized string similar to The size of column '{0}' is not supported. The size is {1}.. Looks up a localized string similar to The type of column '{0}' is not supported. The type is '{1}'. Looks up a localized string similar to The sort ordinal {0} was not specified.. Looks up a localized string similar to There are not enough fields in the Structured type. Structured types must have at least one field.. Looks up a localized string similar to The sort ordinal {0} on field {1} exceeds the total number of fields.. Looks up a localized string similar to '{0}' is not less than '{1}'; '{2}' cannot be greater than '{3}'.. Looks up a localized string similar to Value '{0}' is out of range. Must be between {1} and {2}.. Looks up a localized string similar to The retry has been canceled at attempt {0}.. Looks up a localized string similar to The number of retries has exceeded the maximum of {0} attempt(s).. Looks up a localized string similar to Connecting to a mirrored SQL Server instance using the ApplicationIntent ReadOnly connection option is not supported.. Looks up a localized string similar to Invalid routing information received.. Looks up a localized string similar to Two or more redirections have occurred. Only one redirection per login is allowed.. Looks up a localized string similar to Server provided routing information, but timeout already expired.. Looks up a localized string similar to Unexpected routing information received.. Looks up a localized string similar to Structured, multiple-valued types can only be used for parameters, and cannot be nested within another type.. Looks up a localized string similar to The provider has failed to load the following assembly: {0}. Looks up a localized string similar to Unable to get Type Info for {0},{1}. Looks up a localized string similar to UDT size must be less than {1}, size: {0}. Looks up a localized string similar to Specified type is not registered on the target server.{0}.. Looks up a localized string similar to '{0}' is an invalid user defined type, reason: {1}.. Looks up a localized string similar to UdtTypeName property must be set for UDT parameters.. Looks up a localized string similar to UDT parameters not permitted in the where clause unless part of the primary key.. Looks up a localized string similar to range: 0-8000. Looks up a localized string similar to unexpected error encountered in SqlClient data provider. {0}. Looks up a localized string similar to UdtTypeName property must be set only for UDT parameters.. Looks up a localized string similar to Native format can't be supported.. Looks up a localized string similar to does not implement IBinarySerialize. Looks up a localized string similar to Serialization without mapping is not yet supported.. Looks up a localized string similar to supports both in-memory and user-defined formats. Looks up a localized string similar to Multiple valued assembly references must have a nonzero Assembly Id.. Looks up a localized string similar to The type of field '{0}' is marked as explicit layout which is not allowed in Native format. Looks up a localized string similar to Native format does not support fields (directly or through another field) of type '{0}'. Looks up a localized string similar to Native UDT specifies a max byte size. Looks up a localized string similar to Native UDT not sequential layout due to type '{0}'. Looks up a localized string similar to field '{0}' is marked non-serialized. Looks up a localized string similar to does not have a public constructor. Looks up a localized string similar to no public constructors. Looks up a localized string similar to does not implement INullable. Looks up a localized string similar to not serializable. Looks up a localized string similar to no UDT attribute. Looks up a localized string similar to 'public static x Null { get; }' method is missing. Looks up a localized string similar to 'public static x Parse(System.Data.SqlTypes.SqlString)' method is missing. Looks up a localized string similar to 'public override string ToString()' method is missing. Looks up a localized string similar to Type is not public. Looks up a localized string similar to '{0}' is not a supported handle type.. Looks up a localized string similar to Cannot get value because it is DBNull.. Looks up a localized string similar to Cannot remove relation since it is built in to this dataSet.. Looks up a localized string similar to Cannot remove column since it is built in to this dataSet.. Looks up a localized string similar to Attestation information was not returned by SQL Server. Enclave type is '{0}' and enclave attestation URL is '{1}'.. Looks up a localized string similar to Error occurred when generating enclave package. Attestation Protocol has not been specified in the connection string, but the query requires enclave computations.. Looks up a localized string similar to You have specified the attestation protocol in the connection string, but the SQL Server in use does not support enclave based computations - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details.. Looks up a localized string similar to Failed to initialize connection. The attestation protocol '{0}' does not support the enclave type '{1}'.. Looks up a localized string similar to You have specified the enclave attestation URL in the connection string, but the SQL Server in use does not support enclave based computations - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details.. Looks up a localized string similar to {0} should be identical on all commands ({1}, {2}, {3}, {4}) when doing batch updates.. Looks up a localized string similar to Failed to instantiate an enclave provider with type '{1}' for name '{0}'. Error message: {2} . Looks up a localized string similar to Failed to read the configuration section for enclave providers. Make sure the section is correctly formatted in your application configuration file. Error Message: {0}. Looks up a localized string similar to Key store providers cannot be set more than once.. Looks up a localized string similar to Certificate with thumbprint '{0}' not found in certificate store '{1}' in certificate location '{2}'.. Looks up a localized string similar to Certificate with thumbprint '{0}' not found in certificate store '{1}' in certificate location '{2}'. Verify the certificate path in the column master key definition in the database is correct, and the certificate has been imported correctly into the certificate location/store.. Looks up a localized string similar to Certificate specified in key path '{0}' does not have a private key to encrypt a column encryption key. Verify the certificate is imported correctly.. Looks up a localized string similar to Certificate specified in key path '{0}' does not have a private key to decrypt a column encryption key. Verify the certificate is imported correctly.. Looks up a localized string similar to Failed to decrypt column '{0}'.. Looks up a localized string similar to Internal Error. Encrypted column encryption keys not found when trying to send the keys to the enclave.. Looks up a localized string similar to Internal error. The signature returned by SQL Server for enclave-enabled column master key, specified at key path '{0}', cannot be null or empty.. Looks up a localized string similar to The signature returned by SQL Server for the column master key, specified in key path '{0}', is invalid (does not match the computed signature). Recreate column master key metadata, making sure the signature inside the metadata is computed using the column master key being referenced in the metadata. If the error persists, please contact Microsoft for assistance.. Looks up a localized string similar to Specifies an attestation protocol for its corresponding enclave attestation service.. Looks up a localized string similar to Default column encryption setting for all the commands on the connection.. Looks up a localized string similar to Specifies an endpoint of an enclave attestation service, which will be used to verify whether the enclave, configured in the SQL Server instance for computations on database columns encrypted using Always Encrypted, is valid and secure.. Looks up a localized string similar to Specifies an IP address preference when connecting to SQL instances.. Looks up a localized string similar to Decryption failed. The last 10 bytes of the encrypted column encryption key are: '{0}'. The first 10 bytes of ciphertext are: '{1}'.. Looks up a localized string similar to Internal Error. Empty argument '{0}' specified when constructing an object of type '{1}'. '{0}' cannot be empty.. Looks up a localized string similar to Internal Error. Argument '{0}' cannot be empty when executing method '{1}.{2}'.. Looks up a localized string similar to Empty certificate thumbprint specified in certificate path '{0}'.. Looks up a localized string similar to Internal error. Empty certificate thumbprint specified in certificate path '{0}'.. Looks up a localized string similar to Empty key identifier specified in column master key path: '{0}'. Use the following format for a key stored in a Microsoft Cryptography API: Next Generation (CNG) provider: <CNG Provider Name>{1}<Key Identifier>.. Looks up a localized string similar to Internal error. Empty key identifier specified in column master key path: '{0}'. Use the following format for a key stored in a Microsoft Cryptography API: Next Generation (CNG) provider: <CNG Provider Name>{1}<Key Identifier>.. Looks up a localized string similar to Empty Microsoft Cryptography API: Next Generation (CNG) provider name specified in column master key path: '{0}'. Use the following format for a key stored in a Microsoft Cryptography API: Next Generation (CNG) provider: <CNG Provider Name>{1}<Key Identifier>.. Looks up a localized string similar to Internal error. Empty Microsoft Cryptography API: Next Generation (CNG) provider name specified in column master key path: '{0}'. Use the following format for a key stored in a Microsoft Cryptography API: Next Generation (CNG) provider: <CNG Provider Name>{1}<Key Identifier>.. Looks up a localized string similar to Empty column encryption key specified.. Looks up a localized string similar to Empty key identifier specified in column master key path: '{0}'. Use the following format for a key stored in a Microsoft cryptographic service provider (CSP): <CSP Provider Name>{1}<Key Identifier>.. Looks up a localized string similar to Internal error. Empty key identifier specified in column master key path: '{0}'. Use the following format for a key stored in a Microsoft cryptographic service provider (CSP): <CSP Provider Name>{1}<Key Identifier>.. Looks up a localized string similar to Empty Microsoft cryptographic service provider (CSP) name specified in column master key path: '{0}'. Use the following format for a key stored in a Microsoft cryptographic service provider (CSP): <CSP Provider Name>{1}<Key Identifier>.. Looks up a localized string similar to Internal error. Empty Microsoft cryptographic service provider (CSP) name specified in column master key path: '{0}'. Use the following format for a key stored in a Microsoft cryptographic service provider (CSP): <CSP Provider Name>{1}<Key Identifier>.. Looks up a localized string similar to Internal error. Empty encrypted column encryption key specified.. Looks up a localized string similar to Invalid key store provider name specified. Key store provider names cannot be null or empty.. Looks up a localized string similar to You have specified the enclave attestation URL and attestation protocol in the connection string, but the SQL Server in use does not support enclave based computations - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details.. Looks up a localized string similar to No enclave provider found for enclave type '{0}' and attestation protocol '{1}'. Please specify the correct attestation protocol in the connection string. . Looks up a localized string similar to Executing a query requires enclave computations, but the application configuration is missing the enclave provider section.. Looks up a localized string similar to You have specified the enclave attestation URL in the connection string, but the SQL Server did not return an enclave type. Please make sure the enclave type is correctly configured in your instance - see https://go.microsoft.com/fwlink/?linkid=2157649 for more details.. Looks up a localized string similar to The enclave type '{0}' returned from the server is not supported.. Looks up a localized string similar to Internal Error. Enclave type received from SQL Server is null or empty when executing a query requiring enclave computations.. Looks up a localized string similar to Error encountered while generating package to be sent to enclave. Error message: {0}. Looks up a localized string similar to Internal Error. Failed to encrypt byte package to be sent to the enclave. Error Message: {0} . Looks up a localized string similar to Internal Error. The buffer specified by argument '{0}' for method '{1}.{2}' has insufficient space.. Looks up a localized string similar to The specified ciphertext's encryption algorithm version '{0}' does not match the expected encryption algorithm version '{1}'.. Looks up a localized string similar to Specified encrypted column encryption key contains an invalid encryption algorithm version '{0}'. Expected version is '{1}'.. Looks up a localized string similar to Invalid attestation parameters specified by the enclave provider for enclave type '{0}'. Error occurred when converting the value '{1}' of parameter '{2}' to unsigned int. Error Message: {3}. Looks up a localized string similar to Specified ciphertext has an invalid authentication tag.. Looks up a localized string similar to Invalid certificate location '{0}' in certificate path '{1}'. Use the following format: <certificate location>{4}<certificate store>{4}<certificate thumbprint>, where <certificate location> is either '{2}' or '{3}'.. Looks up a localized string similar to Internal error. Invalid certificate location '{0}' in certificate path '{1}'. Use the following format: <certificate location>{4}<certificate store>{4}<certificate thumbprint>, where <certificate location> is either '{2}' or '{3}'.. Looks up a localized string similar to Invalid certificate path: '{0}'. Use the following format: <certificate location>{3}<certificate store>{3}<certificate thumbprint>, where <certificate location> is either '{1}' or '{2}'.. Looks up a localized string similar to Internal error. Invalid certificate path: '{0}'. Use the following format: <certificate location>{3}<certificate store>{3}<certificate thumbprint>, where <certificate location> is either '{1}' or '{2}'.. Looks up a localized string similar to The specified encrypted column encryption key signature does not match the signature computed with the column master key (certificate) in '{0}'. The encrypted column encryption key may be corrupt, or the specified path may be incorrect.. Looks up a localized string similar to Invalid certificate store '{0}' specified in certificate path '{1}'. Expected value: '{2}'.. Looks up a localized string similar to Internal error. Invalid certificate store '{0}' specified in certificate path '{1}'. Expected value: '{2}'.. Looks up a localized string similar to The specified encrypted column encryption key's ciphertext length: {0} does not match the ciphertext length: {1} when using column master key (certificate) in '{2}'. The encrypted column encryption key may be corrupt, or the specified certificate path may be incorrect.. Looks up a localized string similar to The specified encrypted column encryption key's ciphertext length: {0} does not match the ciphertext length: {1} when using column master key (asymmetric key) in '{2}'. The encrypted column encryption key may be corrupt, or the specified Microsoft Cryptography API: Next Generation (CNG) provider path may be incorrect.. Looks up a localized string similar to The specified encrypted column encryption key's ciphertext length: {0} does not match the ciphertext length: {1} when using column master key (asymmetric key) in '{2}'. The encrypted column encryption key may be corrupt, or the specified Microsoft Cryptographic Service provider (CSP) path may be incorrect.. Looks up a localized string similar to Specified ciphertext has an invalid size of {0} bytes, which is below the minimum {1} bytes required for decryption.. Looks up a localized string similar to An error occurred while opening the Microsoft Cryptography API: Next Generation (CNG) key: '{0}'. Verify that the CNG provider name '{1}' is valid, installed on the machine, and the key '{2}' exists.. Looks up a localized string similar to Internal error. An error occurred while opening the Microsoft Cryptography API: Next Generation (CNG) key: '{0}'. Verify that the CNG provider name '{1}' is valid, installed on the machine, and the key '{2}' exists.. Looks up a localized string similar to Invalid column master key path: '{0}'. Use the following format for a key stored in a Microsoft Cryptography API: Next Generation (CNG) provider: <CNG Provider Name>{1}<Key Identifier>.. Looks up a localized string similar to Internal error. Invalid column master key path: '{0}'. Use the following format for a key stored in a Microsoft Cryptography API: Next Generation (CNG) provider: <CNG Provider Name>{1}<Key Identifier>.. Looks up a localized string similar to Invalid key identifier: '{0}'. Verify that the key identifier in column master key path: '{1}' is valid and exists in the CSP.. Looks up a localized string similar to Internal error. Invalid key identifier: '{0}'. Verify that the key identifier in column master key path: '{1}' is valid and exists in the CSP.. Looks up a localized string similar to Invalid Microsoft cryptographic service provider (CSP) name: '{0}'. Verify that the CSP provider name in column master key path: '{1}' is valid and installed on the machine.. Looks up a localized string similar to Internal error. Invalid Microsoft cryptographic service provider (CSP) name: '{0}'. Verify that the CSP provider name in column master key path: '{1}' is valid and installed on the machine.. Looks up a localized string similar to Invalid column master key path: '{0}'. Use the following format for a key stored in a Microsoft cryptographic service provider (CSP): <CSP Provider Name>{1}<Key Identifier>.. Looks up a localized string similar to Internal error. Invalid column master key path: '{0}'. Use the following format for a key stored in a Microsoft cryptographic service provider (CSP): <CSP Provider Name>{1}<Key Identifier>.. Looks up a localized string similar to Invalid key store provider name '{0}'. '{1}' prefix is reserved for system key store providers.. Looks up a localized string similar to Internal Error. The given database id '{0}' is not valid. Error occurred when converting the database id to unsigned int. Error Message: {1}. Looks up a localized string similar to Internal error. Error occurred when populating enclave metadata. The referenced column encryption key ordinal '{0}' is missing in the encryption metadata returned by SQL Server. Max ordinal is '{1}'. . Looks up a localized string similar to Internal error. Error occurred when populating parameter metadata. The referenced column encryption key ordinal '{0}' is missing in the encryption metadata returned by SQL Server. Max ordinal is '{1}'. . Looks up a localized string similar to Encryption type '{1}' specified for the column in the database is either invalid or corrupted. Valid encryption types for algorithm '{0}' are: {2}.. Looks up a localized string similar to Invalid key encryption algorithm specified: '{0}'. Expected value: '{1}'.. Looks up a localized string similar to Internal error. Invalid key encryption algorithm specified: '{0}'. Expected value: '{1}'.. Looks up a localized string similar to Internal Error. The given key id '{0}' is not valid. Error occurred when converting the key id to unsigned short. Error Message: {1}. Looks up a localized string similar to The column encryption key has been successfully decrypted but its length: {1} does not match the length: {2} for algorithm '{0}'. Verify the encrypted value of the column encryption key in the database.. Looks up a localized string similar to Invalid key store provider name: '{0}'. A key store provider name must denote either a system key store provider or a registered custom key store provider. Valid system key store provider names are: {1}. Valid (currently registered) custom key store provider names are: {2}. Please verify key store provider information in column master key definitions in the database, and verify all custom key store providers used in your application are registered properly.. Looks up a localized string similar to The specified encrypted column encryption key signature does not match the signature computed with the column master key (asymmetric key) in '{0}'. The encrypted column encryption key may be corrupt, or the specified path may be incorrect.. Looks up a localized string similar to The specified encrypted column encryption key's signature length: {0} does not match the signature length: {1} when using column master key (certificate) in '{2}'. The encrypted column encryption key may be corrupt, or the specified certificate path may be incorrect.. Looks up a localized string similar to The specified encrypted column encryption key's signature length: {0} does not match the signature length: {1} when using column master key (asymmetric key) in '{2}'. The encrypted column encryption key may be corrupt, or the specified Microsoft Cryptography API: Next Generation (CNG) provider path may be incorrect.. Looks up a localized string similar to The specified encrypted column encryption key's signature length: {0} does not match the signature length: {1} when using column master key (asymmetric key) in '{2}'. The encrypted column encryption key may be corrupt, or the specified Microsoft cryptographic service provider (CSP) path may be incorrect.. Looks up a localized string similar to Failed to decrypt a column encryption key using key store provider: '{0}'. Verify the properties of the column encryption key and its column master key in your database. The last 10 bytes of the encrypted column encryption key are: '{1}'.. Looks up a localized string similar to Failed to decrypt a column encryption key using key store provider: '{0}'. The last 10 bytes of the encrypted column encryption key are: '{1}'.. Looks up a localized string similar to Specified certificate path has {0} bytes, which exceeds maximum length of {1} bytes.. Looks up a localized string similar to Internal error. Specified certificate path has {0} bytes, which exceeds maximum length of {1} bytes.. Looks up a localized string similar to Internal error. Error occurred when parsing the results of '{0}'. The attestation information resultset is expected to contain only one row, but it contains multiple rows.. Looks up a localized string similar to Error occurred when generating enclave package. Attestation URL has not been specified in the connection string, but the query requires enclave computations. Enclave type is '{0}'. . Looks up a localized string similar to Error occurred when reading '{0}' resultset. Attestation URL has not been specified in the connection string, but the query requires enclave computations. Enclave type is '{1}'. . Looks up a localized string similar to {0} instance in use does not support column encryption.. Looks up a localized string similar to Internal Error. Null argument '{0}' specified when constructing an object of type '{1}'. '{0}' cannot be null.. Looks up a localized string similar to Internal Error. Argument '{0}' cannot be null when executing method '{1}.{2}'.. Looks up a localized string similar to Certificate path cannot be null. Use the following format: <certificate location>{2}<certificate store>{2}<certificate thumbprint>, where <certificate location> is either '{0}' or '{1}'.. Looks up a localized string similar to Internal error. Certificate path cannot be null. Use the following format: <certificate location>{2}<certificate store>{2}<certificate thumbprint>, where <certificate location> is either '{0}' or '{1}'.. Looks up a localized string similar to Internal error. Ciphertext value cannot be null.. Looks up a localized string similar to Column master key path cannot be null. Use the following format for a key stored in a Microsoft Cryptography API: Next Generation (CNG) provider: <CNG Provider Name>{0}<Key Identifier>.. Looks up a localized string similar to Internal error. Column master key path cannot be null. Use the following format for a key stored in a Microsoft Cryptography API: Next Generation (CNG) provider: <CNG Provider Name>{0}<Key Identifier>.. Looks up a localized string similar to Internal error. Encryption algorithm cannot be null. Valid algorithms are: {0}.. Looks up a localized string similar to Column encryption key cannot be null.. Looks up a localized string similar to Internal error. Column encryption key cannot be null.. Looks up a localized string similar to Column master key path cannot be null. Use the following format for a key stored in a Microsoft cryptographic service provider (CSP): <CSP Provider Name>{0}<Key Identifier>.. Looks up a localized string similar to Internal error. Column master key path cannot be null. Use the following format for a key stored in a Microsoft cryptographic service provider (CSP): <CSP Provider Name>{0}<Key Identifier>.. Looks up a localized string similar to Column encryption key store provider dictionary cannot be null. Expecting a non-null value.. Looks up a localized string similar to Internal Error. Enclave package is null during execution of an enclave based query. Enclave type is '{0}' and enclaveAttestationUrl is '{1}'.. Looks up a localized string similar to Internal Error. Enclave session is null during query execution. Enclave type is '{0}' and enclaveAttestationUrl is '{1}'.. Looks up a localized string similar to Unable to communicate with the enclave. Null enclave session information received from the enclave provider. Enclave type is '{0}' and enclave attestation URL is '{1}'.. Looks up a localized string similar to Internal error. Encrypted column encryption key cannot be null.. Looks up a localized string similar to Key encryption algorithm cannot be null.. Looks up a localized string similar to Internal error. Key encryption algorithm cannot be null.. Looks up a localized string similar to Internal error. Plaintext value cannot be null.. Looks up a localized string similar to Null reference specified for key store provider '{0}'. Expecting a non-null value.. Looks up a localized string similar to Internal Error. Failed to serialize keys to be sent to the enclave. The start offset specified by argument '{0}' for method {1}.{2} is out of bounds.. Looks up a localized string similar to Failed to decrypt parameter '{0}'.. Looks up a localized string similar to Failed to encrypt parameter '{0}'.. Looks up a localized string similar to Internal error. Metadata for parameter '{1}' in statement or procedure '{2}' is missing in resultset returned by {0}.. Looks up a localized string similar to Cannot set {0} for {3} '{1}' because encryption is not enabled for the statement or procedure '{2}'.. Looks up a localized string similar to Cannot execute statement or procedure '{1}' because {2} was set for {3} '{0}' and the database expects this parameter to be sent as plaintext. This may be due to a configuration error.. Looks up a localized string similar to Internal error. Metadata for parameters for command '{1}' in a batch is missing in the resultset returned by {0}.. Looks up a localized string similar to Retrieving encrypted column '{0}' with {1} is not supported.. Looks up a localized string similar to Internal Error. SqlColumnEncryptionEnclaveProviderName cannot be null or empty.. Looks up a localized string similar to Column encryption setting for the command. Overrides the connection level default.. Looks up a localized string similar to Defines the time-to-live of entries in the column encryption key cache.. Looks up a localized string similar to Defines whether query metadata caching is enabled.. Looks up a localized string similar to Dictionary object containing SQL Server names and their trusted column master key paths.. Looks up a localized string similar to Forces parameter to be encrypted before sending sensitive data to server. . Looks up a localized string similar to Retrieving encrypted column '{0}' as a {1} is not supported.. Looks up a localized string similar to Unable to establish secure channel. Error Message: {0}. Looks up a localized string similar to Unable to verify a column master key signature. Error message: {0} . Looks up a localized string similar to Internal error. The result returned by '{0}' is invalid. The attestation information resultset is missing for enclave type '{1}'. . Looks up a localized string similar to Internal error. The result returned by '{0}' is invalid. The parameter metadata resultset is missing.. Looks up a localized string similar to Encryption algorithm '{0}' for the column in the database is either invalid or corrupted. Valid algorithms are: {1}.. Looks up a localized string similar to Encryption algorithm id '{0}' for the column in the database is either invalid or corrupted. Valid encryption algorithm ids are: {1}.. Looks up a localized string similar to Failed to decrypt a column encryption key. Invalid key store provider name: '{0}'. A key store provider name must denote either a system key store provider or a registered custom key store provider. Valid system key store provider names are: {1}. Valid (currently registered) custom key store provider names are: {2}. Please verify key store provider information in column master key definitions in the database, and verify all custom key store providers used in your application are registered properly.. Looks up a localized string similar to Encryption and decryption of data type '{0}' is not supported.. Looks up a localized string similar to Normalization version '{0}' received from {2} is not supported. Valid normalization versions are: {1}.. Looks up a localized string similar to Column master key path '{0}' received from server '{1}' is not a trusted key path.. Looks up a localized string similar to Cannot encrypt. Encrypting resulted in {0} bytes of ciphertext which exceeds the maximum allowed limit of {1} bytes. The specified plaintext value is likely too large (plaintext size is: {2} bytes).. Looks up a localized string similar to Failed to check if the enclave is running in the production mode. Contact Customer Support Services.. Looks up a localized string similar to Could not verify enclave policy due to a difference between the expected and actual values of the policy on property '{0}'. Actual: '{1}', Expected: '{2}' - see https://go.microsoft.com/fwlink/?linkid=2160553 for more details.. Looks up a localized string similar to Signature verification of the enclave report failed. The report signature does not match the signature computed using the HGS root certificate. Verify the DNS mapping for the endpoint - see https://go.microsoft.com/fwlink/?linkid=2160553 for more details. If correct, contact Customer Support Services.. Looks up a localized string similar to The enclave report received from SQL Server is not in the correct format. Contact Customer Support Services.. Looks up a localized string similar to Failed to build a chain of trust between the enclave host's health report and the HGS root certificate for attestation URL '{0}' with status: '{1}'. Verify the attestation URL matches the URL configured on the SQL Server - see https://go.microsoft.com/fwlink/?linkid=2160553 for more details. If both the client and SQL Server use the same attestation service, contact Customer Support Services.. Looks up a localized string similar to The value of attribute '{0}' should be '{1}' or '{2}'.. Looks up a localized string similar to Cannot convert '{0}' to type '{1}'.. Looks up a localized string similar to Unable to proceed with deserialization. Data does not implement IXMLSerializable, therefore polymorphism is not supported.. Looks up a localized string similar to DataSet cannot instantiate an abstract ComplexType for the node {0}.. Looks up a localized string similar to DataSet doesn't allow the circular reference in the ComplexType named '{0}'.. Looks up a localized string similar to Column name '{0}' is defined for different mapping types.. Looks up a localized string similar to DataTable does not support schema inference from Xml.. Looks up a localized string similar to Data type not defined.. Looks up a localized string similar to The constraint name {0} is already used in the schema.. Looks up a localized string similar to DataSet will not serialize types that implement IDynamicMetaObjectProvider but do not also implement IXmlSerializable.. Looks up a localized string similar to Cannot find ElementType name='{0}'.. Looks up a localized string similar to DataSet cannot expand entities. Use XmlValidatingReader and set the EntityHandling property accordingly.. Looks up a localized string similar to Invalid XPath selection inside field node. Cannot find: {0}.. Looks up a localized string similar to Invalid 'Key' node inside constraint named: {0}.. Looks up a localized string similar to Prefix '{0}' is not valid, because it contains special characters.. Looks up a localized string similar to Invalid XPath selection inside selector node: {0}.. Looks up a localized string similar to IsDataSet attribute is missing in input Schema.. Looks up a localized string similar to Duplicated declaration '{0}'.. Looks up a localized string similar to Invalid Relation definition: different length keys.. Looks up a localized string similar to Invalid {0} syntax: missing required '{1}' attribute.. Looks up a localized string similar to Missing '{0}' part in '{1}' constraint named '{2}'.. Looks up a localized string similar to Cannot load diffGram. The 'sql' node is missing.. Looks up a localized string similar to Cannot load diffGram. Table '{0}' is missing in the destination dataset.. Looks up a localized string similar to Cannot proceed with serializing DataTable '{0}'. It contains a DataRow which has multiple parent rows on the same Foreign Key.. Looks up a localized string similar to An error occurred with the multiple target converter while writing an Xml Schema. A null or empty string was returned.. Looks up a localized string similar to An error occurred with the multiple target converter while writing an Xml Schema. See the inner exception for details.. Looks up a localized string similar to Circular reference in self-nested table '{0}'.. Looks up a localized string similar to Type '{0}' does not implement IXmlSerializable interface therefore can not proceed with serialization.. Looks up a localized string similar to Child table key is missing in relation '{0}'.. Looks up a localized string similar to Child table name is missing in relation '{0}'.. Looks up a localized string similar to Parent table name is missing in relation '{0}'.. Looks up a localized string similar to Parent table key is missing in relation '{0}'.. Looks up a localized string similar to DataSet doesn't support 'union' or 'list' as simpleType.. Looks up a localized string similar to Cannot determine the DataSet Element. IsDataSet attribute exist more than once.. Looks up a localized string similar to Undefined data type: '{0}'.. Looks up a localized string similar to Value '{1}' is invalid for attribute '{0}'.. Provides support for efficiently using Tasks to implement the APM (Begin/End) pattern. Marshals the Task as an IAsyncResult, using the supplied callback and state to implement the APM pattern. The Task to be marshaled. The callback to be invoked upon completion. The state to be stored in the IAsyncResult. An IAsyncResult to represent the task's asynchronous operation. Processes an IAsyncResult returned by Begin. The IAsyncResult to unwrap. Processes an IAsyncResult returned by Begin. The IAsyncResult to unwrap. Invokes the callback asynchronously when the task has completed. The Task to await. The callback to invoke when the Task completes. The Task used as the IAsyncResult. Provides a simple IAsyncResult that wraps a Task. This, in effect, allows for overriding what's seen for the CompletedSynchronously and AsyncState values. The wrapped Task. The new AsyncState value. The new CompletedSynchronously value. Initializes the IAsyncResult with the Task to wrap and the overriding AsyncState and CompletedSynchronously values. The Task to wrap. The new AsyncState value The new CompletedSynchronously value. Permanent NotImplementedException with no message shown to user. Permanent NotImplementedException with localized message shown to user. Temporary NotImplementedException with no message shown to user. Example: Exception.ActiveIssue("https://github.com/dotnet/corefx/issues/xxxx") or Exception.ActiveIssue("TFS xxxxxx"). Contains internal path helpers that are shared between many projects. Returns true if the given character is a valid drive letter Adds the extended path prefix (\\?\) if not already a device path, IF the path is not relative, AND the path is more than 259 characters. (> MAX_PATH + null). This will also insert the extended prefix if the path ends with a period or a space. Trailing periods and spaces are normally eaten away from paths during normalization, but if we see such a path at this point it should be normalized and has retained the final characters. (Typically from one of the *Info classes) DO NOT USE- Use EnsureExtendedPrefixIfNeeded. This will be removed shortly. Adds the extended path prefix (\\?\) if not already a device path, IF the path is not relative, AND the path is more than 259 characters. (> MAX_PATH + null) Adds the extended path prefix (\\?\) if not relative or already a device path. Returns true if the path uses any of the DOS device path syntaxes. ("\\.\", "\\?\", or "\??\") Returns true if the path is a device UNC (\\?\UNC\, \\.\UNC\) Returns true if the path uses the canonical form of extended syntax ("\\?\" or "\??\"). If the path matches exactly (cannot use alternate directory separators) Windows will skip normalization and path length checks. Check for known wildcard characters. '*' and '?' are the most common ones. Gets the length of the root of the path (drive, share, etc.). Returns true if the path specified is relative to the current drive or working directory. Returns false if the path is fixed to a specific drive or UNC path. This method does no validation of the path (URIs will be returned as relative as a result). Handles paths that use the alternate directory separator. It is a frequent mistake to assume that rooted paths (Path.IsPathRooted) are not relative. This isn't the case. "C:a" is drive relative- meaning that it will be resolved against the current directory for C: (rooted, but relative). "C:\a" is rooted and not relative (the current directory will not be used to modify the path). True if the given character is a directory separator. Normalize separators in the given path. Converts forward slashes into back slashes and compresses slash runs, keeping initial 2 if present. Also trims initial whitespace in front of "rooted" paths (see PathStartSkip). This effectively replicates the behavior of the legacy NormalizePath when it was called with fullCheck=false and expandShortpaths=false. The current NormalizePath gets directory separator normalization from Win32's GetFullPathName(), which will resolve relative paths and as such can't be used here (and is overkill for our uses). Like the current NormalizePath this will not try and analyze periods/spaces within directory segments. The only callers that used to use Path.Normalize(fullCheck=false) were Path.GetDirectoryName() and Path.GetPathRoot(). Both usages do not need trimming of trailing whitespace here. GetPathRoot() could technically skip normalizing separators after the second segment- consider as a future optimization. For legacy desktop behavior with ExpandShortPaths: - It has no impact on GetPathRoot() so doesn't need consideration. - It could impact GetDirectoryName(), but only if the path isn't relative (C:\ or \\Server\Share). In the case of GetDirectoryName() the ExpandShortPaths behavior was undocumented and provided inconsistent results if the path was fixed/relative. For example: "C:\PROGRA~1\A.TXT" would return "C:\Program Files" while ".\PROGRA~1\A.TXT" would return ".\PROGRA~1". If you ultimately call GetFullPath() this doesn't matter, but if you don't or have any intermediate string handling could easily be tripped up by this undocumented behavior. We won't match this old behavior because: 1. It was undocumented 2. It was costly (extremely so if it actually contained '~') 3. Doesn't play nice with string logic 4. Isn't a cross-plat friendly concept/behavior Returns true if the path is effectively empty for the current OS. For unix, this is empty or null. For Windows, this is empty, null, or just spaces ((char)32). Provides logging facilities for System.Net libraries. The single event source instance to use for all logging. Logs entrance to a method. `this`, or another object that serves to provide context for the operation. A description of the entrance, including any arguments to the call. The calling member. Logs entrance to a method. `this`, or another object that serves to provide context for the operation. The object to log. The calling member. Logs entrance to a method. `this`, or another object that serves to provide context for the operation. The first object to log. The second object to log. The calling member. Logs entrance to a method. `this`, or another object that serves to provide context for the operation. The first object to log. The second object to log. The third object to log. The calling member. Logs exit from a method. `this`, or another object that serves to provide context for the operation. A description of the exit operation, including any return values. The calling member. Logs exit from a method. `this`, or another object that serves to provide context for the operation. A return value from the member. The calling member. Logs exit from a method. `this`, or another object that serves to provide context for the operation. A return value from the member. A second return value from the member. The calling member. Logs an information message. `this`, or another object that serves to provide context for the operation. The message to be logged. The calling member. Logs an information message. `this`, or another object that serves to provide context for the operation. The message to be logged. The calling member. Logs an error message. `this`, or another object that serves to provide context for the operation. The message to be logged. The calling member. Logs an error message. `this`, or another object that serves to provide context for the operation. The message to be logged. The calling member. Logs a fatal error and raises an assert. `this`, or another object that serves to provide context for the operation. The message to be logged. The calling member. Logs a fatal error and raises an assert. `this`, or another object that serves to provide context for the operation. The message to be logged. The calling member. Logs the contents of a buffer. `this`, or another object that serves to provide context for the operation. The buffer to be logged. The calling member. Logs the contents of a buffer. `this`, or another object that serves to provide context for the operation. The buffer to be logged. The starting offset from which to log. The number of bytes to log. The calling member. Logs the contents of a buffer. `this`, or another object that serves to provide context for the operation. The starting location of the buffer to be logged. The number of bytes to log. The calling member. Logs a relationship between two objects. The first object. The second object. The calling member. Logs a relationship between two objects. `this`, or another object that serves to provide context for the operation. The first object. The second object. The calling member. CTL_CODE method. Identifies the device type. This value must match the value that is set in the DeviceType member of the driver's DEVICE_OBJECT structure. Identifies the function to be performed by the driver. Values of less than 0x800 are reserved for Microsoft. Values of 0x800 and higher can be used by vendors. Indicates how the system will pass data between the caller of DeviceIoControl (or IoBuildDeviceIoControlRequest) and the driver that handles the IRP. Indicates the type of access that a caller must request when opening the file object that represents the device (see IRP_MJ_CREATE). RequiredAccess. Indicates the type of access that a caller must request when opening the file object that represents the device (see IRP_MJ_CREATE). The I/O manager sends the IRP for any caller that has a handle to the file object that represents the target device object. The I/O manager sends the IRP only for a caller with read access rights, allowing the underlying device driver to transfer data from the device to system memory. The I/O manager sends the IRP only for a caller with write access rights, allowing the underlying device driver to transfer data from system memory to its device. TransferType. Indicates how the system will pass data between the caller of DeviceIoControl (or IoBuildDeviceIoControlRequest) and the driver that handles the IRP. Specifies the buffered I/O method, which is typically used for transferring small amounts of data per request. Most I/O control codes for device and intermediate drivers use this TransferType value. Specifies the direct I/O method, which is typically used for reading or writing large amounts of data, using DMA or PIO, that must be transferred quickly. Specify METHOD_IN_DIRECT if the caller of DeviceIoControl or IoBuildDeviceIoControlRequest will pass data to the driver. Specifies the direct I/O method, which is typically used for reading or writing large amounts of data, using DMA or PIO, that must be transferred quickly. Specify METHOD_OUT_DIRECT if the caller of DeviceIoControl or IoBuildDeviceIoControlRequest will receive data from the driver. Specifies neither buffered nor direct I/O. The I/O manager does not provide any system buffers or MDLs. The IRP supplies the user-mode virtual addresses of the input and output buffers that were specified to DeviceIoControl or IoBuildDeviceIoControlRequest, without validating or mapping them. Length, in bytes, not including the the null, if any. Max size of the buffer in bytes FILE_FULL_EA_INFORMATION structure. Provides extended attribute (EA) information. This structure is used primarily by network drivers. The offset of the next FILE_FULL_EA_INFORMATION-type entry. This member is zero if no other entries follow this one. Can be zero or can be set with FILE_NEED_EA, indicating that the file to which the EA belongs cannot be interpreted without understanding the associated extended attributes. The length in bytes of the EaName array. This value does not include a null-terminator to EaName. The length in bytes of each EA value in the array. Status Request dependent value. The completion status, either STATUS_SUCCESS if the operation was completed successfully or some other informational, warning, or error status. Reserved for internal use. OBJECT_ATTRIBUTES structure. The OBJECT_ATTRIBUTES structure specifies attributes that can be applied to objects or object handles by routines that create objects and/or return handles to objects. Optional handle to root object directory for the given ObjectName. Can be a file system directory or object manager directory. Name of the object. Must be fully qualified if RootDirectory isn't set. Otherwise is relative to RootDirectory. If null, object will receive default security settings. Optional quality of service to be applied to the object. Used to indicate security impersonation level and context tracking mode (dynamic or static). Equivalent of InitializeObjectAttributes macro with the exception that you can directly set SQOS. This handle can be inherited by child processes of the current process. This flag only applies to objects that are named within the object manager. By default, such objects are deleted when all open handles to them are closed. If this flag is specified, the object is not deleted when all open handles are closed. Only a single handle can be open for this object. Lookups for this object should be case insensitive. Create on existing object should open, not fail with STATUS_OBJECT_NAME_COLLISION. Open the symbolic link, not its target. File creation disposition when calling directly to NT APIs. Default. Replace or create. Deletes existing file instead of overwriting. As this potentially deletes it requires that DesiredAccess must include Delete. This has no equivalent in CreateFile. Open if exists or fail if doesn't exist. Equivalent to OPEN_EXISTING or . TruncateExisting also uses Open and then manually truncates the file by calling NtSetInformationFile with FileAllocationInformation and an allocation size of 0. Create if doesn't exist or fail if does exist. Equivalent to CREATE_NEW or . Open if exists or create if doesn't exist. Equivalent to OPEN_ALWAYS or . Open and overwrite if exists or fail if doesn't exist. Equivalent to TRUNCATE_EXISTING or . Open and overwrite if exists or create if doesn't exist. Equivalent to CREATE_ALWAYS or . Options for creating/opening files with NtCreateFile. File being created or opened must be a directory file. Disposition must be FILE_CREATE, FILE_OPEN, or FILE_OPEN_IF. Can only be used with FILE_SYNCHRONOUS_IO_ALERT/NONALERT, FILE_WRITE_THROUGH, FILE_OPEN_FOR_BACKUP_INTENT, and FILE_OPEN_BY_FILE_ID flags. Applications that write data to the file must actually transfer the data into the file before any requested write operation is considered complete. This flag is set automatically if FILE_NO_INTERMEDIATE_BUFFERING is set. All accesses to the file are sequential. File cannot be cached in driver buffers. Cannot use with AppendData desired access. All operations are performed synchronously. Any wait on behalf of the caller is subject to premature termination from alerts. Cannot be used with FILE_SYNCHRONOUS_IO_NONALERT. Synchronous DesiredAccess flag is required. I/O system will maintain file position context. All operations are performed synchronously. Waits in the system to synchronize I/O queuing and completion are not subject to alerts. Cannot be used with FILE_SYNCHRONOUS_IO_ALERT. Synchronous DesiredAccess flag is required. I/O system will maintain file position context. File being created or opened must not be a directory file. Can be a data file, device, or volume. Create a tree connection for this file in order to open it over the network. Not used by device and intermediate drivers. Complete the operation immediately with a success code of STATUS_OPLOCK_BREAK_IN_PROGRESS if the target file is oplocked. Not compatible with ReserveOpfilter or OpenRequiringOplock. Not used by device and intermediate drivers. If the extended attributes on an existing file being opened indicate that the caller must understand extended attributes to properly interpret the file, fail the request. Not used by device and intermediate drivers. Accesses to the file can be random, so no sequential read-ahead operations should be performed on the file by FSDs or the system. Delete the file when the last handle to it is passed to NtClose. Requires Delete flag in DesiredAccess parameter. Open the file by reference number or object ID. The file name that is specified by the ObjectAttributes name parameter includes the 8 or 16 byte file reference number or ID for the file in the ObjectAttributes name field. The device name can optionally be prefixed. NTFS supports both reference numbers and object IDs. 16 byte reference numbers are 8 byte numbers padded with zeros. ReFS only supports reference numbers (not object IDs). 8 byte and 16 byte reference numbers are not related. Note that as the UNICODE_STRING will contain raw byte data, it may not be a "valid" string. Not used by device and intermediate drivers. \??\C:\{8 bytes of binary FileID} \device\HardDiskVolume1\{16 bytes of binary ObjectID} {8 bytes of binary FileID} The file is being opened for backup intent. Therefore, the system should check for certain access rights and grant the caller the appropriate access to the file before checking the DesiredAccess parameter against the file's security descriptor. Not used by device and intermediate drivers. When creating a file, specifies that it should not inherit the compression bit from the parent directory. The file is being opened and an opportunistic lock (oplock) on the file is being requested as a single atomic operation. The file system checks for oplocks before it performs the create operation and will fail the create with a return code of STATUS_CANNOT_BREAK_OPLOCK if the result would be to break an existing oplock. Not compatible with CompleteIfOplocked or ReserveOpFilter. Windows 7 and up. CreateFile2 uses this flag to prevent opening a file that you don't have access to without specifying FILE_SHARE_READ. (Preventing users that can only read a file from denying access to other readers.) Windows 7 and up. The client opening the file or device is session aware and per session access is validated if necessary. Windows 8 and up. This flag allows an application to request a filter opportunistic lock (oplock) to prevent other applications from getting share violations. Not compatible with CompleteIfOplocked or OpenRequiringOplock. If there are already open handles, the create request will fail with STATUS_OPLOCK_NOT_GRANTED. Open a file with a reparse point attribute, bypassing the normal reparse point processing. Causes files that are marked with the Offline attribute not to be recalled from remote storage. More details can be found in Remote Storage documentation (see Basic Concepts). https://technet.microsoft.com/en-us/library/cc938459.aspx System.IO.FileAccess looks up these values when creating handles File Security and Access Rights https://msdn.microsoft.com/en-us/library/windows/desktop/aa364399.aspx For a file, the right to read data from the file. Directory version of this flag is . For a directory, the right to list the contents. File version of this flag is . For a file, the right to write data to the file. Directory version of this flag is . For a directory, the right to create a file in a directory. File version of this flag is . For a file, the right to append data to a file. is needed to overwrite existing data. Directory version of this flag is . For a directory, the right to create a subdirectory. File version of this flag is . For a named pipe, the right to create a pipe instance. The right to read extended attributes. The right to write extended attributes. The right to execute the file. Directory version of this flag is . For a directory, the right to traverse the directory. File version of this flag is . For a directory, the right to delete a directory and all the files it contains, including read-only files. The right to read attributes. The right to write attributes. All standard and specific rights. [FILE_ALL_ACCESS] The right to delete the object. The right to read the information in the object's security descriptor. Doesn't include system access control list info (SACL). The right to modify the discretionary access control list (DACL) in the object's security descriptor. The right to change the owner in the object's security descriptor. The right to use the object for synchronization. Enables a thread to wait until the object is in the signaled state. This is required if opening a synchronous handle. Same as READ_CONTROL. Same as READ_CONTROL. Same as READ_CONTROL. Maps internally to | | | | . (For directories, | | | | .) Maps internally to | | | | | . (For directories, | | AddFile | | | .) Maps internally to | | | . (For directories, | | | .)