Skip to content

Commit cf0a69b

Browse files
Merge pull request #36502 from VanMSFT/sql-security-freshness-review-248683
Fix 4 UUF technical accuracy issues
2 parents 8c01e4f + f226d77 commit cf0a69b

4 files changed

Lines changed: 57 additions & 42 deletions

File tree

docs/connect/jdbc/reference/setsendstringparametersasunicode-method-sqlserverdatasource.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "setSendStringParametersAsUnicode Method (SQLServerDataSource)"
33
description: "setSendStringParametersAsUnicode Method (SQLServerDataSource)"
44
author: David-Engel
55
ms.author: davidengel
6-
ms.date: "01/19/2017"
6+
ms.date: "01/28/2026"
77
ms.service: sql
88
ms.subservice: connectivity
99
ms.topic: reference
@@ -14,7 +14,7 @@ apitype: "Assembly"
1414
# setSendStringParametersAsUnicode Method (SQLServerDataSource)
1515
[!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)]
1616

17-
Sets a **boolean** value that indicates if sending string parameters to the server in UNICODE format is enabled.
17+
Sets a **boolean** value that indicates whether the driver sends string parameters to the server in Unicode format.
1818

1919
## Syntax
2020

@@ -26,17 +26,21 @@ public void setSendStringParametersAsUnicode(boolean sendStringParametersAsUnico
2626
#### Parameters
2727
*sendStringParametersAsUnicode*
2828

29-
**true** if string parameters are sent to the server in UNICODE format. Otherwise, **false**.
29+
**true** if the driver sends string parameters to the server in Unicode format. Otherwise, **false**.
3030

3131
## Remarks
32-
If the sendStringParametersAsUnicode property is set to **true**, which is the default value, string parameters are sent to the server in UNICODE format. If sendStringParametersAsUnicode is set to **false** string parameters are sent to the server in an ASCII/MBCS format, not in UNICODE. If sendStringParametersAsUnicode is not set, [getSendStringParametersAsUnicode](../../../connect/jdbc/reference/getsendstringparametersasunicode-method-sqlserverdatasource.md) returns the default value of **true**.
32+
When the sendStringParametersAsUnicode property is set to **true**, which is the default value, the driver sends string parameters to the server in **UTF-16LE (UTF-16 Little Endian) encoding**, matching SQL Server's internal NCHAR/NVARCHAR storage format. The driver converts CHAR, VARCHAR, and LONGVARCHAR types to NCHAR, NVARCHAR, and LONGNVARCHAR respectively before sending them to the server.
3333

34-
Note: Changing this value can affect sorting of results from the database. The sorting differences are due to different sorting rules for Unicode versus non-Unicode characters.
34+
When sendStringParametersAsUnicode is set to **false**, the driver sends string parameters in the database's collation-specific **MBCS (Multi-Byte Character Set) encoding**. The specific code page used depends on the target database or column collation. This isn't ASCII (which is 7-bit only), but rather the full character encoding defined by the collation.
3535

36-
For more information about the sendStringParametersAsUnicode connection property, see [Setting the Connection Properties](../../../connect/jdbc/setting-the-connection-properties.md).
37-
38-
## See Also
39-
[SQLServerDataSource Members](../../../connect/jdbc/reference/sqlserverdatasource-members.md)
40-
[SQLServerDataSource Class](../../../connect/jdbc/reference/sqlserverdatasource-class.md)
41-
36+
If you don't set sendStringParametersAsUnicode, getSendStringParametersAsUnicode returns the default value of **true**.
37+
38+
> [!NOTE]
39+
> Changing this value can affect the sorting of results from the database. The sorting differences are due to different sorting rules for Unicode versus non-Unicode characters. For VARCHAR/CHAR columns, setting this to **false** avoids implicit conversion overhead on the server.
40+
41+
For more information about the sendStringParametersAsUnicode connection property, see [Setting the Connection Properties](../../../connect/jdbc/setting-the-connection-properties.md). For details about SQL Server's Unicode support, see [Collation and Unicode Support](/sql/relational-databases/collations/collation-and-unicode-support).
4242

43+
## Related content
44+
45+
- [SQLServerDataSource Members](../../../connect/jdbc/reference/sqlserverdatasource-members.md)
46+
- [SQLServerDataSource Class](../../../connect/jdbc/reference/sqlserverdatasource-class.md)

docs/connect/oledb/when-to-use-oledb-driver-for-sql-server.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "When to Use OLE DB Driver"
33
description: "Learn when to use OLE DB Driver for SQL Server and the high level data access concepts that differentiate the different it from other drivers."
44
author: David-Engel
55
ms.author: davidengel
6-
ms.date: "06/14/2018"
6+
ms.date: 01/28/2026
77
ms.service: sql
88
ms.subservice: connectivity
99
ms.topic: "reference"
@@ -20,21 +20,22 @@ helpviewer_keywords:
2020

2121
[!INCLUDE[Driver_OLEDB_Download](../../includes/driver_oledb_download.md)]
2222

23-
OLE DB Driver for SQL Server is one technology that you can use to access data in a [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] database. For a discussion of the different data-access technologies, see [Data Access Technologies Road Map](../connect-history.md)
23+
OLE DB Driver for SQL Server is one technology you can use to access data in a [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] database. For a discussion of the different data-access technologies, see [Data Access Technologies Road Map](../connect-history.md).
2424

25-
When deciding whether to use OLE DB Driver for SQL Server as the data access technology of your application, you should consider several factors.
26-
27-
For new applications, if you're using a managed programming language such as Microsoft Visual C# or Visual Basic, and you need to access the new features in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], you should use the .NET Framework Data Provider for [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], which is part of the .NET Framework.
28-
29-
If you are developing a COM-based application and need to access the new features introduced in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], you should use OLE DB Driver for SQL Server. If you don't need access to the new features of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], you can continue to use Windows Data Access Components (WDAC).
30-
31-
For existing OLE DB applications, the primary issue is whether you need to access the new features of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. If you have a mature application that does not need the new features of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], you can continue to use WDAC. But if you do need to access those new features, such as the [xml data type](../../t-sql/xml/xml-transact-sql.md), you should use OLE DB Driver for SQL Server.
25+
When you decide whether to use OLE DB Driver for SQL Server as the data access technology for your application, consider several factors.
26+
27+
For new applications, if you use a managed programming language such as Microsoft Visual C# or Visual Basic and need to access the new features in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], use the .NET Framework Data Provider for [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], which is part of the .NET Framework.
28+
29+
If you develop a COM-based application and need to access the new features introduced in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], use OLE DB Driver for SQL Server. If you don't need access to the new features of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], you can continue to use Windows Data Access Components (WDAC).
30+
31+
For existing OLE DB applications, the primary issue is whether you need to access the new features of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. If you have a mature application that doesn't need the new features of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], you can continue to use WDAC. But if you need to access those new features, such as the [xml data type](../../t-sql/xml/xml-transact-sql.md), use OLE DB Driver for SQL Server.
3232

3333
Both OLE DB Driver for SQL Server and MDAC support read committed transaction isolation using row versioning, but only OLE DB Driver for SQL Server supports snapshot transaction isolation. (In programming terms, read committed transaction isolation with row versioning is the same as Read-Committed transaction.)
3434

3535
For information about the differences between OLE DB Driver for SQL Server and MDAC, see [Updating an Application to OLE DB Driver for SQL Server from MDAC](../oledb/applications/updating-an-application-to-oledb-driver-for-sql-server-from-mdac.md).
3636

37-
## See Also
38-
[OLE DB Driver for SQL Server](oledb-driver-for-sql-server.md)
39-
[OLE DB How-to Topics](ole-db-how-to/ole-db-how-to-topics.md)
37+
## Related content
38+
39+
- [OLE DB Driver for SQL Server](oledb-driver-for-sql-server.md)
40+
- [OLE DB How-to Topics](ole-db-how-to/ole-db-how-to-topics.md)
4041

docs/odbc/reference/appendixes/sql-to-c-date.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "SQL to C: Date"
33
description: "SQL to C: Date"
44
author: David-Engel
55
ms.author: davidengel
6-
ms.date: "01/19/2017"
6+
ms.date: 01/28/2026
77
ms.service: sql
88
ms.subservice: connectivity
99
ms.topic: reference
@@ -13,24 +13,34 @@ helpviewer_keywords:
1313
- "data conversions from SQL to C types [ODBC], date"
1414
---
1515
# SQL to C: Date
16-
The identifier for the date ODBC SQL data type is:
16+
17+
The identifier for the date ODBC SQL data type is:
18+
19+
SQL_TYPE_DATE
1720

18-
SQL_TYPE_DATE
19-
20-
The following table shows the ODBC C data types to which date SQL data may be converted. For an explanation of the columns and terms in the table, see [Converting Data from SQL to C Data Types](../../../odbc/reference/appendixes/converting-data-from-sql-to-c-data-types.md).
21-
22-
|C type identifier|Test|**TargetValuePtr*|**StrLen_or_IndPtr*|SQLSTATE|
21+
The following table shows the ODBC C data types to which the driver can convert date SQL data. For an explanation of the columns and terms in the table, see [Converting Data from SQL to C Data Types](../../../odbc/reference/appendixes/converting-data-from-sql-to-c-data-types.md).
22+
23+
> [!NOTE]
24+
> For character conversions, *BufferLength* must include space for the null terminator. A date string is 10 characters long (yyyy-mm-dd), so *BufferLength* must be at least 11 bytes to avoid truncation.
25+
26+
|C type identifier|Test|**TargetValuePtr*|**StrLen_or_IndPtr*|SQLSTATE|
2327
|-----------------------|----------|------------------------|----------------------------|--------------|
2428
|SQL_C_CHAR|*BufferLength* > Character byte length<br /><br /> 11 <= *BufferLength* <= Character byte length<br /><br /> *BufferLength* < 11|Data<br /><br /> Truncated data<br /><br /> Undefined|10<br /><br /> Length of data in bytes<br /><br /> Undefined|n/a<br /><br /> 01004<br /><br /> 22003|
2529
|SQL_C_WCHAR|*BufferLength* > Character length<br /><br /> 11 <= *BufferLength* <= Character length<br /><br /> *BufferLength* < 11|Data<br /><br /> Truncated data<br /><br /> Undefined|10<br /><br /> Length of data in characters<br /><br /> Undefined|n/a<br /><br /> 01004<br /><br /> 22003|
2630
|SQL_C_BINARY|Byte length of data <= *BufferLength*<br /><br /> Byte length of data > *BufferLength*|Data<br /><br /> Undefined|Length of data in bytes<br /><br /> Undefined|n/a<br /><br /> 22003|
27-
|SQL_C_TYPE_DATE|None[a]|Data|6[c]|n/a|
28-
|SQL_C_TYPE_TIMESTAMP|None[a]|Data[b]|16[c]|n/a|
29-
30-
[a] The value of *BufferLength* is ignored for this conversion. The driver assumes that the size of **TargetValuePtr* is the size of the C data type.
31-
32-
[b] The time fields of the timestamp structure are set to zero.
33-
34-
[c] This is the size of the corresponding C data type.
31+
|SQL_C_TYPE_DATE|None<sup>1</sup>|Data|6<sup>3</sup>|n/a|
32+
|SQL_C_TYPE_TIMESTAMP|None<sup>1</sup>|Data<sup>2</sup>|16<sup>3</sup>|n/a|
33+
34+
<sup>1</sup> The value of *BufferLength* is ignored for this conversion. The driver assumes that the size of **TargetValuePtr* is the size of the C data type.
35+
36+
<sup>2</sup> The driver sets the time fields of the timestamp structure to zero.
37+
38+
<sup>3</sup> This is the size of the corresponding C data type.
3539

36-
When date SQL data is converted to character C data, the resulting string is in the "*yyyy*-*mm*-*dd*" format. This format is not affected by the Windows country/region setting.
40+
When the driver converts date SQL data to character C data, the resulting string is in the "*yyyy*-*mm*-*dd*" format. This format isn't affected by the Windows country/region setting.
41+
42+
## Related content
43+
44+
- [Converting Data from SQL to C Data Types](../../../odbc/reference/appendixes/converting-data-from-sql-to-c-data-types.md)
45+
- [SQL to C: Timestamp](../../../odbc/reference/appendixes/sql-to-c-timestamp.md)
46+
- [Data Type Identifiers and Descriptors](../../../odbc/reference/appendixes/data-type-identifiers-and-descriptors.md)

docs/relational-databases/policy-based-management/increase-or-disable-blocked-process-threshold.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Increase or Disable Blocked Process Threshold"
33
description: "Increase or Disable Blocked Process Threshold."
44
author: VanMSFT
55
ms.author: vanto
6-
ms.date: 12/15/2023
6+
ms.date: 01/28/2026
77
ms.service: sql
88
ms.subservice: security
99
ms.topic: reference
@@ -14,11 +14,11 @@ helpviewer_keywords:
1414

1515
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
1616

17-
This rules checks that the blocked process threshold option is set to 0 (disabled) or set to a value higher than or equal to 5 (seconds). Setting the blocked process threshold option to a value from 1 to 4 can cause the deadlock monitor to run constantly. Values 1 to 4 should only be used for troubleshooting, and never long term or in a production environment without the assistance of [!INCLUDE [msCoName](../../includes/msconame-md.md)] Customer Service and Support.
17+
This rule checks that the blocked process threshold option is set to 0 (disabled) or to a value of 5 seconds or higher. When you set the blocked process threshold to a value from 1 to 4, the deadlock monitor doesn't run because it only wakes every 5 seconds. If you configure the threshold to a value from 1 to 4, the system doesn't generate blocked process reports. Don't use values 1 to 4 in a production environment because they have no effect.
1818

1919
## Best practices recommendations
2020

21-
To resolve this problem, set the blocked process threshold option to a value of 5 (seconds) or higher, or disable blocked process threshold by setting the value to 0. To set the blocked process threshold to a value of `5` seconds, execute the following statement:
21+
To resolve this issue, set the blocked process threshold option to a value of 5 seconds or higher, or disable it by setting the value to 0. To set the blocked process threshold to `5` seconds, execute the following statement:
2222

2323
```
2424
sp_configure 'show advanced options', 1 ;

0 commit comments

Comments
 (0)