From d2e8267ea1f7e0b07601c284a1fe0254fe811124 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Tue, 22 Apr 2025 16:38:49 -0700 Subject: [PATCH] add language slugs --- .../DbExpressionBuilder.xml | 20 +++++------ .../DbConnectionStringBuilder.xml | 12 +++---- xml/System.Data.Common/DbParameter.xml | 6 ++-- .../EntityConnection.xml | 36 +++++++++---------- xml/System.Data.Objects/ObjectQuery`1.xml | 8 ++--- xml/System.Data.Odbc/OdbcConnection.xml | 8 ++--- .../OdbcConnectionStringBuilder.xml | 2 +- xml/System.Data.Odbc/OdbcParameter.xml | 10 +++--- xml/System.Data.OleDb/OleDbConnection.xml | 8 ++--- .../OleDbConnectionStringBuilder.xml | 4 +-- xml/System.Data.OleDb/OleDbParameter.xml | 4 +-- .../OracleConnectionStringBuilder.xml | 2 +- xml/System.Data.OracleClient/OracleLob.xml | 8 ++--- .../OracleParameter.xml | 8 ++--- .../OracleParameterCollection.xml | 4 +-- .../SqlClientFactory.xml | 1 - xml/System.Data.SqlClient/SqlConnection.xml | 1 - .../SqlConnectionStringBuilder.xml | 8 ++--- xml/System.Data.SqlClient/SqlParameter.xml | 4 +-- .../SqlParameterCollection.xml | 2 +- xml/System.Data/DataColumn.xml | 4 +-- xml/System.Data/DataSet.xml | 16 ++++----- xml/System.Data/DataTable.xml | 10 +++--- 23 files changed, 87 insertions(+), 99 deletions(-) diff --git a/xml/System.Data.Common.CommandTrees.ExpressionBuilder/DbExpressionBuilder.xml b/xml/System.Data.Common.CommandTrees.ExpressionBuilder/DbExpressionBuilder.xml index 88aa677404a..1fd91d9d45e 100644 --- a/xml/System.Data.Common.CommandTrees.ExpressionBuilder/DbExpressionBuilder.xml +++ b/xml/System.Data.Common.CommandTrees.ExpressionBuilder/DbExpressionBuilder.xml @@ -1845,15 +1845,15 @@ The expressions produced by and , or must be an anonymous type with DbExpression-derived properties. The following are examples of supported types for `TSelector`: + To be compatible with Join, `TSelector` must be derived from , or must be an anonymous type with DbExpression-derived properties. The following are examples of supported types for `TSelector`: -``` +```csharp outer.Join(inner, o => o.Property("ID"), i => i.Property("ID"), (o, i) => o.Property("Name")) ``` (`TSelector` is ). -``` +```csharp outer.Join(inner, o => o.Property("ID"), i => i.Property("ID"), (o, i) => new { OName = o.Property("Name"), IName = i.Property("Name") }) ``` @@ -3451,15 +3451,15 @@ The result of contains a name or expression that is no , or must be an anonymous type with DbExpression-derived properties. The following are examples of supported types for `TProjection`: + To be compatible with Select, `TProjection` must be derived from , or must be an anonymous type with DbExpression-derived properties. The following are examples of supported types for `TProjection`: -``` +```csharp source.Select(x => x.Property("Name")) ``` - `TProjection` is ). + (`TProjection` is ). -``` +```csharp source.Select(x => new { Name = x.Property("Name") }) ``` @@ -3548,15 +3548,15 @@ The expression produced by does not have a collection , or must be an anonymous type with DbExpression-derived properties. The following are examples of supported types for `TSelector`: + To be compatible with SelectMany, `TSelector` must be derived from , or must be an anonymous type with DbExpression-derived properties. The following are examples of supported types for `TSelector`: -``` +```csharp source.SelectMany(x => x.Property("RelatedCollection"), (source, apply) => apply.Property("Name")) ``` (`TSelector` is ). -``` +```csharp source.SelectMany(x => x.Property("RelatedCollection"), (source, apply) => new { SourceName = source.Property("Name"), RelatedName = apply.Property("Name") }) ``` diff --git a/xml/System.Data.Common/DbConnectionStringBuilder.xml b/xml/System.Data.Common/DbConnectionStringBuilder.xml index faf3ac39b1e..68043db134c 100644 --- a/xml/System.Data.Common/DbConnectionStringBuilder.xml +++ b/xml/System.Data.Common/DbConnectionStringBuilder.xml @@ -107,7 +107,7 @@ builder["Initial Catalog"] = "AdventureWorks;NewValue=Bad"; The result is the following connection string that handles the invalid value in a safe manner: -``` +```txt data source=(local);integrated security=True; initial catalog="AdventureWorks;NewValue=Bad" ``` @@ -676,7 +676,7 @@ initial catalog="AdventureWorks;NewValue=Bad" ## Remarks This property returns a semicolon-delimited list of key/value pairs stored within the collection maintained by the . Each pair contains the key and value, separated by an equal sign. The following example illustrates a typical connection string. -``` +```txt "Persist Security Info=False;Integrated Security=SSPI;Initial Catalog=AdventureWorks;Data Source=(local)" ``` @@ -763,7 +763,7 @@ initial catalog="AdventureWorks;NewValue=Bad" This code produces the following output: -``` +```txt Contents of the DbConnectionStringBuilder: provider="Provider=Microsoft.Jet.OLEDB.4.0";data source=C:\MyExcel.xls;extended @@ -902,7 +902,7 @@ The collection contains the key "Data Source". This sample displays the following output: -``` +```txt builder1 = value1=SomeValue;value2=20;value3=30;value4=40 builder2 = value2=20;value3=30;value4=40;value1=SomeValue builder3 = value2=20;value3=30;value4=40;value1=SOMEVALUE @@ -1297,7 +1297,7 @@ builder2.EquivalentTo(builder3) = False This sample displays the following output: -``` +```txt Removed 'Provider' data source=C:\Demo.mdb;jet oledb:system database=system.mdw Unable to remove 'User ID' @@ -2817,7 +2817,7 @@ This member is an explicit interface member implementation. It can be used only The sample displays the following results: -``` +```txt Provider=sqloledb DATA SOURCE=192.168.168.1,1433 Unable to retrieve value for //InvalidKey// diff --git a/xml/System.Data.Common/DbParameter.xml b/xml/System.Data.Common/DbParameter.xml index 49c3b4dc136..c254e7f7d93 100644 --- a/xml/System.Data.Common/DbParameter.xml +++ b/xml/System.Data.Common/DbParameter.xml @@ -677,16 +677,16 @@ ## Remarks 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): + 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 generates 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): -``` +```tsql ((@IsNull_FieldName = 1 AND FieldName IS NULL) OR (FieldName = @Original_FieldName)) ``` If for the field is `false`, generates the following WHERE clause: -``` +```tsql FieldName = @OriginalFieldName ``` diff --git a/xml/System.Data.EntityClient/EntityConnection.xml b/xml/System.Data.EntityClient/EntityConnection.xml index e51f16425f4..5ae90d0fc23 100644 --- a/xml/System.Data.EntityClient/EntityConnection.xml +++ b/xml/System.Data.EntityClient/EntityConnection.xml @@ -22,9 +22,9 @@ ## Remarks To avoid inadvertently putting objects such as and out of sync with their metadata, must lock its metadata. No changes to the connection string are allowed after the metadata is locked. The following are two scenarios in which metadata is locked: -- The instance is constructed through the parameterless constructor, or through the constructor, which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling or locks the metadata. +- The instance is constructed through the parameterless constructor, or through the constructor, which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling or locks the metadata. -- The instance is constructed through the constructor, which accepts a and a . In this case, the metadata is locked at construction time. No changes to the connection string are ever allowed. +- The instance is constructed through the constructor, which accepts a and a . In this case, the metadata is locked at construction time. No changes to the connection string are ever allowed. When metadata is loaded, the verifies that the conceptual model, the storage model, and the mapping file are all present. @@ -50,9 +50,9 @@ ## Remarks To avoid inadvertently putting objects such as and out of sync with their metadata, must lock its metadata. No changes to the connection string are allowed after the metadata is locked. The following are two scenarios in which metadata is locked: -- The instance is constructed through the parameterless constructor, or through the constructor, which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling or locks the metadata. +- The instance is constructed through the parameterless constructor, or through the constructor, which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling or locks the metadata. -- The instance is constructed through the constructor, which accepts a and a . In this case the metadata is locked at construction time. No changes to the connection string are ever allowed. +- The instance is constructed through the constructor, which accepts a and a . In this case the metadata is locked at construction time. No changes to the connection string are ever allowed. When metadata is loaded, the verifies that the conceptual model, the storage model, and the mapping file are all present. @@ -83,9 +83,9 @@ ## Remarks To avoid inadvertently putting objects such as and out of sync with their metadata, must lock its metadata. No changes to the connection string are allowed after the metadata is locked. The following are two scenarios in which metadata is locked: -- The instance is constructed through the parameterless constructor, or through the constructor, which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling or locks the metadata. +- The instance is constructed through the parameterless constructor, or through the constructor, which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling or locks the metadata. -- The instance is constructed through the constructor, which accepts a and a . In this case the metadata is locked at construction time. No changes to the connection string are ever allowed. +- The instance is constructed through the constructor, which accepts a and a . In this case the metadata is locked at construction time. No changes to the connection string are ever allowed. When metadata is loaded, the verifies that the conceptual model, the storage model, and the mapping file are all present. @@ -122,9 +122,9 @@ To avoid inadvertently putting objects and out of sync with their metadata, must lock its metadata. No changes to the connection string are allowed after the metadata is locked. The following are two scenarios in which metadata is locked: -- The instance is constructed through the parameterless constructor, or through this constructor (), which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling or locks the metadata. +- The instance is constructed through the parameterless constructor, or through this constructor (), which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling or locks the metadata. -- The instance is constructed through the constructor, which accepts a and a . In this case the metadata is locked at construction time. No changes to the connection string are ever allowed. +- The instance is constructed through the constructor, which accepts a and a . In this case the metadata is locked at construction time. No changes to the connection string are ever allowed. When metadata is loaded, the verifies that the conceptual model, the storage model, and the mapping file are all present. @@ -164,9 +164,9 @@ To avoid inadvertently putting objects such as and out of sync with their metadata, the must lock its metadata. No changes to the connection string are allowed after the metadata is locked. The following are two scenarios in which metadata is locked: -- The instance is constructed through the parameterless constructor, or through the constructor, which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling or locks the metadata. +- The instance is constructed through the parameterless constructor, or through the constructor, which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling or locks the metadata. -- The instance is constructed through this constructor (), which accepts a and a . In this case the metadata is locked at construction time. No changes to the connection string are ever allowed. +- The instance is constructed through this constructor (), which accepts a and a . In this case the metadata is locked at construction time. No changes to the connection string are ever allowed. When metadata is loaded, the verifies that the conceptual model, the storage model, and the mapping file are all present. @@ -408,11 +408,9 @@ If the `Name` keyword is used in the property, other keywords are not allowed. The `Name` keyword refers to a named connection string that is stored in the `connectionStrings` section in an application configuration file, as shown in the following example. The `Provider`, `Metadata`, and `Provider Connection String` values are retrieved from the configuration file at run time. - - The keyword/value pairs can also be supplied directly in the property, as shown in the following example. In this case, the `Name` keyword is not used. -``` +```txt "Provider=System.Data.SqlClient; Metadata=c:\metadata|c:\Metadata\Sql; Provider Connection String= 'Data Source=localhost; @@ -421,9 +419,9 @@ Provider Connection String= 'Data Source=localhost; To avoid inadvertently putting objects such as and out of sync with their metadata, must lock its metadata. No changes to the connection string are allowed after the metadata is locked. The following are two scenarios in which metadata is locked: -- The instance is constructed through the parameterless constructor, or through the constructor, which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling or locks the metadata. +- The instance is constructed through the parameterless constructor, or through the constructor, which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling or locks the metadata. -- The instance is constructed through the constructor, which accepts a and a . In this case the metadata is locked at construction time. No changes to the connection string are ever allowed. +- The instance is constructed through the constructor, which accepts a and a . In this case the metadata is locked at construction time. No changes to the connection string are ever allowed. When metadata is loaded, the verifies that the conceptual model, the storage model, and the mapping file are all present. @@ -716,9 +714,9 @@ Provider Connection String= 'Data Source=localhost; To avoid inadvertently putting objects such as and out of sync with their metadata, must lock its metadata. No changes to the connection string are allowed after the metadata is locked. The following are two scenarios in which metadata is locked: -- The instance is constructed through the parameterless constructor, or through the constructor, which accepts a connection string. In either case the connection string may be changed multiple times before the connection is opened. or locks the metadata. +- The instance is constructed through the parameterless constructor, or through the constructor, which accepts a connection string. In either case the connection string may be changed multiple times before the connection is opened. or locks the metadata. -- The instance is constructed through the constructor, which accepts a and a . In this case the metadata is locked at construction time. No changes to the connection string are ever allowed. +- The instance is constructed through the constructor, which accepts a and a . In this case the metadata is locked at construction time. No changes to the connection string are ever allowed. When metadata is loaded, the verifies that the conceptual model, the storage model, and the mapping file are all present. @@ -752,9 +750,9 @@ Provider Connection String= 'Data Source=localhost; ## Remarks To avoid inadvertently putting objects such as and out of sync with their metadata, must lock its metadata. No changes to the connection string are allowed after the metadata is locked. The following are two scenarios in which metadata is locked: -- The instance is constructed through the parameterless constructor, or through the constructor, which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling or locks the metadata. +- The instance is constructed through the parameterless constructor, or through the constructor, which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling or locks the metadata. -- The instance is constructed through the constructor, which that accepts a and a . In this case the metadata is locked at construction time. No changes to the connection string are ever allowed. +- The instance is constructed through the constructor, which that accepts a and a . In this case the metadata is locked at construction time. No changes to the connection string are ever allowed. When metadata is loaded, the verifies that the conceptual model, the storage model, and the mapping file are all present. diff --git a/xml/System.Data.Objects/ObjectQuery`1.xml b/xml/System.Data.Objects/ObjectQuery`1.xml index 064e169807a..2defddae484 100644 --- a/xml/System.Data.Objects/ObjectQuery`1.xml +++ b/xml/System.Data.Objects/ObjectQuery`1.xml @@ -896,13 +896,13 @@ This example creates a new that conta The supplied `query` that defines the results to add must be of the same type or of a type that can be promoted to the type of this . For example, the following is valid because `DiscontinuedProducts` can be promoted to `Products`: -``` +```csharp ObjectQuery.Union(ObjectQuery) ``` The following will throw an exception because `Products` cannot be promoted to `DiscontinuedProducts`. -``` +```csharp ObjectQuery .Union(ObjectQuery) ``` @@ -956,13 +956,13 @@ ObjectQuery .Union(ObjectQuery) The supplied `query` that defines results to add must be of the same type or of a type that can be promoted to the type of this . For example, the following is valid because `DiscontinuedProducts` can be promoted to `Products`: -``` +```csharp ObjectQuery.Union(ObjectQuery) ``` The following will throw an exception because `Products` cannot be promoted to `DiscontinuedProducts`. -``` +```csharp ObjectQuery .Union(ObjectQuery) ``` diff --git a/xml/System.Data.Odbc/OdbcConnection.xml b/xml/System.Data.Odbc/OdbcConnection.xml index c5ebdba47b4..0c992ba4372 100644 --- a/xml/System.Data.Odbc/OdbcConnection.xml +++ b/xml/System.Data.Odbc/OdbcConnection.xml @@ -519,7 +519,7 @@ You can use the property to connect to a variety of data sources. This includes an ODBC data source name (DSN). The following example illustrates several possible connection strings. -``` +```txt "Driver={SQL Server};Server=(local);Trusted_Connection=Yes;Database=AdventureWorks;" "Driver={Microsoft ODBC for Oracle};Server=ORACLE8i7;Persist Security Info=False;Trusted_Connection=Yes" @@ -538,13 +538,11 @@ Many of the settings specified in the string have corresponding read-only properties (for example, `Server=(local)`, which corresponds to the property). These properties are updated after the connection is opened, except when an error is detected. In this case, none of the properties are updated. properties (such as ) return only default settings or those settings specified in the . - In the Microsoft .NET Framework version 1.0, validation of the connection string does not occur until an application calls the method. It is the responsibility of the underlying ODBC driver to validate the connection string. If the connection string contains invalid or unsupported properties, the driver may raise an at run time. - - However, in the .NET Framework version 1.1 and later versions, some basic validation of the connection string occurs as soon as you set the property. At that time, the data provider verifies that the connection string meets the "keyword=value;..." format, but it does not verify whether keywords or values are valid. The remaining verification is performed by the underlying ODBC driver when the application calls the method. +Some basic validation of the connection string occurs as soon as you set the property. At that time, the data provider verifies that the connection string meets the "keyword=value;..." format, but it does not verify whether keywords or values are valid. The remaining verification is performed by the underlying ODBC driver when the application calls the method. An ODBC connection string has the following syntax: -``` +```txt connection-string ::= empty-string[;] | attribute[;] | attribute; connection-string empty-string ::= attribute ::= attribute-keyword=attribute-value | DRIVER=[{]attribute-value[}] diff --git a/xml/System.Data.Odbc/OdbcConnectionStringBuilder.xml b/xml/System.Data.Odbc/OdbcConnectionStringBuilder.xml index 8ecd794df3e..4b9fd52842f 100644 --- a/xml/System.Data.Odbc/OdbcConnectionStringBuilder.xml +++ b/xml/System.Data.Odbc/OdbcConnectionStringBuilder.xml @@ -79,7 +79,7 @@ Console.WriteLine(builder.ConnectionString); The result is the following connection string that handles the invalid value in a safe manner: -``` +```txt Driver={SQL Server};Server="MyServer;NewValue=Bad" ``` diff --git a/xml/System.Data.Odbc/OdbcParameter.xml b/xml/System.Data.Odbc/OdbcParameter.xml index e4ac698bab3..16568d14b3d 100644 --- a/xml/System.Data.Odbc/OdbcParameter.xml +++ b/xml/System.Data.Odbc/OdbcParameter.xml @@ -222,7 +222,7 @@ OleDbDataReader reader = command.ExecuteReader(); ## Remarks Use caution when you are using 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 OdbcParameter("@pname", Convert.ToInt32(0)); ``` @@ -789,12 +789,10 @@ public void CreateOdbcParameter() ## Remarks Instead of named parameters, the ODBC .NET Provider uses positional parameters that are marked with a question mark (?) in the syntax of the command text. Parameter objects in the and the actual parameters accepted by the stored procedure or parameterized SQL statement correspond to each other based on the order in which the objects are inserted into the collection instead of by parameter name. Parameter names can be supplied, but will be ignored during parameter object binding. - - ## Examples The following example assumes that the data source has a table name **MyTable** and a stored procedure named MyProc that is defined as: -``` +```tsql CREATE TABLE MyTable (col1 int, col2 smallmoney, col3 decimal) CREATE PROC MyProc (@p1 int, @p2 smallmoney, @p3 decimal) AS INSERT INTO MyTable VALUES (@p1, @p2, @p3) ``` @@ -1241,14 +1239,14 @@ public void CreateOdbcParameter() 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 example. In this query expression, "FieldName" represents the name of the field: -``` +```tsql ((@IsNull_FieldName = 1 AND FieldName IS NULL) OR (FieldName = @Original_FieldName)) ``` If for the field is false, generates the following WHERE clause: -``` +```tsql FieldName = @OriginalFieldName ``` diff --git a/xml/System.Data.OleDb/OleDbConnection.xml b/xml/System.Data.OleDb/OleDbConnection.xml index 9d695fd45d5..7e9b19988a6 100644 --- a/xml/System.Data.OleDb/OleDbConnection.xml +++ b/xml/System.Data.OleDb/OleDbConnection.xml @@ -528,7 +528,7 @@ You can use the property to connect to a variety of data sources. The following example illustrates several possible connection strings. -``` +```txt "Provider=MSDAORA; Data Source=ORACLE8i7;Persist Security Info=False;Integrated Security=Yes" "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\bin\LocalAccess40.mdb" @@ -553,14 +553,12 @@ 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. - To include an equal sign (=) in a keyword or value, it must be preceded by another equal sign. For example, in the hypothetical connection string + To include an equal sign (=) in a keyword or value, it must be preceded by another equal sign. For example, in the following hypothetical connection string, the keyword is "key=word" and the value is "value". -``` +```txt "key==word=value" ``` - the keyword is "key=word" and the value is "value". - If a specific keyword in a keyword=value pair occurs multiple times in a connection string, the last occurrence listed is used in the value set. Keywords are not case sensitive. diff --git a/xml/System.Data.OleDb/OleDbConnectionStringBuilder.xml b/xml/System.Data.OleDb/OleDbConnectionStringBuilder.xml index c7f3dc69343..99372c81f96 100644 --- a/xml/System.Data.OleDb/OleDbConnectionStringBuilder.xml +++ b/xml/System.Data.OleDb/OleDbConnectionStringBuilder.xml @@ -85,12 +85,10 @@ builder["User Id"] = "Admin;NewValue=Bad"; The result is the following connection string that handles the invalid value in a safe manner: -``` +```txt Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Sample.mdb;User ID="Admin;NewValue=Bad" ``` - - ## Examples The following console application builds connection strings for several OLE DB databases. First, the example creates a connection string for a Microsoft Access database, and then creates a connection string for an IBM DB2 database. The example also parses an existing connection string, and demonstrates various ways of manipulating the connection string's contents. diff --git a/xml/System.Data.OleDb/OleDbParameter.xml b/xml/System.Data.OleDb/OleDbParameter.xml index 7a59e9cbf01..f5264c57ff6 100644 --- a/xml/System.Data.OleDb/OleDbParameter.xml +++ b/xml/System.Data.OleDb/OleDbParameter.xml @@ -1282,14 +1282,14 @@ public void CreateOleDbParameter() 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): -``` +```tsql ((@IsNull_FieldName = 1 AND FieldName IS NULL) OR (FieldName = @Original_FieldName)) ``` If for the field is false, generates the following WHERE clause: -``` +```tsql FieldName = @OriginalFieldName ``` diff --git a/xml/System.Data.OracleClient/OracleConnectionStringBuilder.xml b/xml/System.Data.OracleClient/OracleConnectionStringBuilder.xml index 844b98997b3..5bfd95a282e 100644 --- a/xml/System.Data.OracleClient/OracleConnectionStringBuilder.xml +++ b/xml/System.Data.OracleClient/OracleConnectionStringBuilder.xml @@ -64,7 +64,7 @@ System.Diagnostics.Debug.WriteLine(builder.ConnectionString); The result is the following connection string that handles the invalid value in a safe manner by enclosing the User ID value in quotes: -``` +```txt Data Source=OracleDemo;Integrated Security=True;User ID="Mary;NewValue=Bad" ``` diff --git a/xml/System.Data.OracleClient/OracleLob.xml b/xml/System.Data.OracleClient/OracleLob.xml index 3a1987684fc..06081771468 100644 --- a/xml/System.Data.OracleClient/OracleLob.xml +++ b/xml/System.Data.OracleClient/OracleLob.xml @@ -895,7 +895,7 @@ connection.Close(); ## Remarks The following example demonstrates how to create a temporary `LOB`. -``` +```csharp OracleConnection connection = new OracleConnection("server=MyServer; integrated security=yes;"); connection.Open(); OracleTransaction transaction = connection.BeginTransaction(); @@ -1018,14 +1018,14 @@ connection.Close ## Remarks You can construct an that is NULL using this format: -``` +```csharp OracleLob myLob = OracleLOB.Null; ``` This technique is used primarily to test whether a `LOB` returned from the server is NULL, as this example illustrates: -``` -If(myLob == OracleLob.Null) +```csharp +if(myLob == OracleLob.Null) ``` A NULL `LOB` behaves similarly to a zero byte `LOB` in that succeeds and always returns zero bytes. diff --git a/xml/System.Data.OracleClient/OracleParameter.xml b/xml/System.Data.OracleClient/OracleParameter.xml index 7484e55b4bd..e41ab7b7484 100644 --- a/xml/System.Data.OracleClient/OracleParameter.xml +++ b/xml/System.Data.OracleClient/OracleParameter.xml @@ -169,9 +169,9 @@ OleDbDataReader reader = command.ExecuteReader(); ## Remarks When you specify an in the `value` parameter, the is inferred from the Microsoft .NET Framework type of the . - Use caution when you are using this overload of the constructor. 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 Microsoft Visual C# example demonstrates. + Use caution when you are using this overload of the constructor. 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 OracleParameter("pname", Convert.ToInt32(0)); ``` @@ -1087,14 +1087,14 @@ public void CreateOracleDbParameter() 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): -``` +```tsql ((@IsNull_FieldName = 1 AND FieldName IS NULL) OR (FieldName = @Original_FieldName)) ``` If for the field is false, generates the following WHERE clause: -``` +```tsql FieldName = @OriginalFieldName ``` diff --git a/xml/System.Data.OracleClient/OracleParameterCollection.xml b/xml/System.Data.OracleClient/OracleParameterCollection.xml index cc6e5ff5ce9..ad1f47ce8d5 100644 --- a/xml/System.Data.OracleClient/OracleParameterCollection.xml +++ b/xml/System.Data.OracleClient/OracleParameterCollection.xml @@ -62,7 +62,7 @@ The .NET Framework Data Provider for Oracle does not support the question mark (?) placeholder for passing parameters to an SQL statement called by an of `CommandType.Text`. In this case, named parameters must be used. For example: -``` +```tsql SELECT * FROM Customers WHERE CustomerID = :pCustomerID ``` @@ -272,7 +272,7 @@ SELECT * FROM Customers WHERE CustomerID = :pCustomerID ## Remarks Use caution when using this overload of the method 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 parameters.Add("pname", Convert.ToInt32(0)); ``` diff --git a/xml/System.Data.SqlClient/SqlClientFactory.xml b/xml/System.Data.SqlClient/SqlClientFactory.xml index ef08c175cb1..d9ce2a91e11 100644 --- a/xml/System.Data.SqlClient/SqlClientFactory.xml +++ b/xml/System.Data.SqlClient/SqlClientFactory.xml @@ -233,7 +233,6 @@ Dim cmd As DbConnection = newFactory.CreateConnection() ```csharp SqlClientFactory newFactory = SqlClientFactory.Instance; DbConnection cmd = newFactory.CreateConnection(); - ``` ]]> diff --git a/xml/System.Data.SqlClient/SqlConnection.xml b/xml/System.Data.SqlClient/SqlConnection.xml index f31b83c181e..d5ebe239892 100644 --- a/xml/System.Data.SqlClient/SqlConnection.xml +++ b/xml/System.Data.SqlClient/SqlConnection.xml @@ -87,7 +87,6 @@ Using connection As New SqlConnection(connectionString) connection.Open() ' Do work here; connection closed on following line. End Using - ``` ```csharp diff --git a/xml/System.Data.SqlClient/SqlConnectionStringBuilder.xml b/xml/System.Data.SqlClient/SqlConnectionStringBuilder.xml index f31e0ddcb68..1c543523837 100644 --- a/xml/System.Data.SqlClient/SqlConnectionStringBuilder.xml +++ b/xml/System.Data.SqlClient/SqlConnectionStringBuilder.xml @@ -78,7 +78,7 @@ Console.WriteLine(builder.ConnectionString); The result is the following connection string that handles the invalid value in a safe manner: -``` +```txt Source=(local);Initial Catalog="AdventureWorks;NewValue=Bad"; Integrated Security=True ``` @@ -275,7 +275,7 @@ The class provides a fix The sample displays the following text in the console window: -``` +```txt Original: Data Source=(local);Initial Catalog=AdventureWorks;Integrated Security=True ApplicationName=".Net SqlClient Data Provider" Modified: Data Source=(local);Initial Catalog=AdventureWorks;Integrated Security=True;Application Name="My Application" @@ -776,7 +776,7 @@ Modified: Data Source=(local);Initial Catalog=AdventureWorks;Integrated Security The example displays the following output in the console window: -``` +```txt Connection string = Data Source=(local);Initial Catalog=AdventureWorks;Integrated Security=True True True @@ -2385,7 +2385,7 @@ This property corresponds to the "Integrated Security" and "trusted_connection" The sample displays the following results: -``` +```txt Data Source=(local) Trusted_Connection=True Unable to retrieve value for 'InvalidKey' diff --git a/xml/System.Data.SqlClient/SqlParameter.xml b/xml/System.Data.SqlClient/SqlParameter.xml index 504a954e171..b9704454bbe 100644 --- a/xml/System.Data.SqlClient/SqlParameter.xml +++ b/xml/System.Data.SqlClient/SqlParameter.xml @@ -1451,14 +1451,14 @@ static void CreateSqlParameterLocaleId(){ 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): -``` +```tsql ((@IsNull_FieldName = 1 AND FieldName IS NULL) OR (FieldName = @Original_FieldName)) ``` If for the field is false, generates the following WHERE clause: -``` +```tsql FieldName = @OriginalFieldName ``` diff --git a/xml/System.Data.SqlClient/SqlParameterCollection.xml b/xml/System.Data.SqlClient/SqlParameterCollection.xml index fd3661488af..f45bb27a302 100644 --- a/xml/System.Data.SqlClient/SqlParameterCollection.xml +++ b/xml/System.Data.SqlClient/SqlParameterCollection.xml @@ -328,7 +328,7 @@ This member is an explicit interface member implementation. It can be used only Use caution when you are using this overload of the method to specify integer parameter values. Because this overload takes a of type , you must convert the integral value to an type when the value is zero, as the following C# example demonstrates. -``` +```csharp parameters.Add("@pname", Convert.ToInt32(0)); ``` diff --git a/xml/System.Data/DataColumn.xml b/xml/System.Data/DataColumn.xml index 128f2fd830e..293cdd7df71 100644 --- a/xml/System.Data/DataColumn.xml +++ b/xml/System.Data/DataColumn.xml @@ -982,7 +982,7 @@ For example, if a is named "customerID," and its property is set to `MappingType.Element`, the column value will produce the following XML: -``` +```xml ALFKI ...... @@ -996,7 +996,7 @@ However, if the same column is mapped to `MappingType.Attribute`, the following XML is produced: -``` +```xml diff --git a/xml/System.Data/DataSet.xml b/xml/System.Data/DataSet.xml index 328e7015d21..06fa3005d33 100644 --- a/xml/System.Data/DataSet.xml +++ b/xml/System.Data/DataSet.xml @@ -4265,7 +4265,7 @@ class Program { If the XML Schema for a includes `targetNamespace`, data may not be read, and you may encounter exceptions when calling to load the with XML that contains elements with no qualifying namespace. To read unqualified elements, set `elementFormDefault` equal to "qualified" in your XML Schema, as the following example demonstrates. -``` +```xml includes `targetNamespace`, data may not be read, and you may encounter exceptions when calling to load the with XML that contains elements with no qualifying namespace. To read unqualified elements, set `elementFormDefault` equal to "qualified" in your XML Schema as the following example demonstrates. -``` +```xml includes a `targetNamespace`, data may not be read, and you may encounter exceptions when calling to load the with XML that contains elements with no qualifying namespace. To read unqualified elements, set `elementFormDefault` equal to "qualified" in your XML Schema as the following example demonstrates. -``` +```xml includes a `targetNamespace`, data may not be read, and you may encounter exceptions when calling to load the with XML that contains elements with no qualifying namespace. To read unqualified elements, set `elementFormDefault` equal to "qualified" in your XML Schema as the following example demonstrates. -``` +```xml includes `targetNamespace`, data may not be read, and you may encounter exceptions when calling to load the with XML that contains elements with no qualifying namespace. To read unqualified elements, set `elementFormDefault` equal to "qualified" in your XML Schema as the following example demonstrates. -``` +```xml includes `targetNamespace`, data may not be read, and you may encounter exceptions when calling to load the with XML that contains elements with no qualifying namespace. To read unqualified elements, set `elementFormDefault` equal to "qualified" in your XML Schema as the following example demonstrates. -``` +```xml includes a `targetNamespace`, data may not be read, and you may encounter exceptions when calling to load the with XML that contains elements with no qualifying namespace. To read unqualified elements, set `elementFormDefault` equal to "qualified" in your XML Schema as the following example demonstrates. -``` +```xml includes a `targetNamespace`, data may not be read, and you may encounter exceptions when calling to load the with XML that contains elements with no qualifying namespace. To read unqualified elements, set `elementFormDefault` equal to "qualified" in your XML Schema as the following example demonstrates. -``` +```xml The example displays the following output in the console window: -``` +```xml ============================== Customer table, without hierarchy ============================== @@ -8562,7 +8562,7 @@ sdata:PrimaryKey="true"> The example displays the following output in the console window: -``` +```xml ============================== Customer table, without hierarchy ============================== @@ -9046,7 +9046,7 @@ xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> The example displays the following output in the console window: -``` +```xml ============================== Customer table, without hierarchy ==============================