Skip to content

Commit 76c3d5e

Browse files
Merge pull request #10585 from MicrosoftDocs/main638731910749351984sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents fb33032 + 2e50a24 commit 76c3d5e

16 files changed

+511
-29
lines changed

docs/data-tools/accessing-data-in-visual-studio.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ Most of the other SQL and NoSQL database products that are listed here can be ho
118118
:::moniker-end
119119

120120
> [!NOTE]
121-
> Extended support for SQL Server 2005 ended on April 12, 2016. There is no guarantee that data tools in Visual Studio 2015 and later will continue to work with SQL Server 2005.
121+
> Extended support for SQL Server 2005 ended on April 12, 2016. There's no guarantee that data tools in Visual Studio 2015 and later will continue to work with SQL Server 2005.
122122
123123
## .NET languages
124124

125-
The data access technology described in the Visual Studio documentation uses ADO.NET. ADO.NET is a legacy data access framework and is not recommended for modern data applications. We recommend targeting .NET Core or .NET 5 and later and using [Entity Framework Core](/ef/) for data access development.
125+
The data access technology described in the Visual Studio documentation uses ADO.NET. ADO.NET is a legacy data access framework and isn't recommended for modern data applications. We recommend targeting .NET Core or .NET 5 and later and using [Entity Framework Core](/ef/) for data access development.
126126

127127
ADO.NET is a set of classes that defines an interface for accessing any kind of data source, both relational and non-relational. Visual Studio has several tools and designers that work with ADO.NET to help you connect to databases, manipulate the data, and present the data to the user. The documentation in this section describes how to use those tools. You can also program directly against the ADO.NET command objects. For more information about calling the ADO.NET APIs directly, see [ADO.NET](/dotnet/framework/data/adonet/index).
128128

@@ -132,20 +132,20 @@ Universal Windows Platform (UWP) apps in C# or Visual Basic can use the Microsof
132132

133133
For data storage on the local machine, the recommended approach is to use SQLite, which runs in the same process as the app. If an object-relational mapping (ORM) layer is required, you can use Entity Framework. For more information, see [Data access](/windows/uwp/data-access/index).
134134

135-
If you are connecting to Azure services, be sure to download the latest [Azure SDK tools](https://azure.microsoft.com/downloads/).
135+
If you're connecting to Azure services, be sure to download the latest [Azure SDK tools](https://azure.microsoft.com/downloads/).
136136

137137
### Data providers
138138

139139
For a database to be consumable in ADO.NET, it must have a custom *ADO.NET data provider* or else must expose an ODBC or OLE DB interface. Microsoft provides a [list of ADO.NET data providers](/dotnet/framework/data/adonet/data-providers) for SQL Server products, as well as ODBC and OLE DB providers.
140140

141141
> [!NOTE]
142-
> If you're using Visual Studio to connect to databases using OLEDB or ODBC data providers, you will need to be aware that versions of Visual Studio prior to Visual Studio 2022 are all 32-bit processes. This means some of the data tools in Visual Studio will only be able to connect to OLEDB or ODBC databases using 32-bit data providers. This includes the Microsoft Access 32-bit OLEDB data provider as well as other third-party 32-bit providers.
142+
> If you're using Visual Studio to connect to databases using OLEDB or ODBC data providers, you'll need to be aware that versions of Visual Studio prior to Visual Studio 2022 are all 32-bit processes. This means some of the data tools in Visual Studio will only be able to connect to OLEDB or ODBC databases using 32-bit data providers. This includes the Microsoft Access 32-bit OLEDB data provider as well as other third-party 32-bit providers.
143143
>
144-
> If you're using Visual Studio 2022 to connect to databases, you will need to be aware that Visual Studio 2022 is a 64-bit process. This means some of the data tools in Visual Studio will not be able to connect to OLEDB or ODBC databases using 32-bit data providers.
144+
> If you're using Visual Studio 2022 to connect to databases, you'll need to be aware that Visual Studio 2022 is a 64-bit process. This means some of the data tools in Visual Studio will not be able to connect to OLEDB or ODBC databases using 32-bit data providers.
145145
>
146-
> If you need to maintain 32-bit applications that connect to OLEDB or ODBC databases, you will still be able to build and run the application with Visual Studio 2022. However, if you need to use any of the Visual Studio Data Tools such as Server Explorer, Data Source Wizard, or the DataSet Designer, you will need to use an earlier version of Visual Studio that is still a 32-bit process. The last version of Visual Studio that was a 32-bit process was Visual Studio 2019.
146+
> If you need to maintain 32-bit applications that connect to OLEDB or ODBC databases, you'll still be able to build and run the application with Visual Studio 2022. However, if you need to use any of the Visual Studio Data Tools such as Server Explorer, Data Source Wizard, or the DataSet Designer, you'll need to use an earlier version of Visual Studio that is still a 32-bit process. The last version of Visual Studio that was a 32-bit process was Visual Studio 2019.
147147
>
148-
> If you plan on converting the project to be a 64-bit process, it's recommended that you use the 64-bit Microsoft Access database Engine, also called Access Connectivity Engine (ACE). Please see [OLE DB Provider for Jet and ODBC driver are 32-bit versions only](/office/troubleshoot/access/jet-odbc-driver-available-32-bit-version) for more information.
148+
> If you plan on converting the project to be a 64-bit process, it's recommended that you use the 64-bit Microsoft Access database Engine, also called Access Connectivity Engine (ACE). See [OLE DB Provider for Jet and ODBC driver are 32-bit versions only](/office/troubleshoot/access/jet-odbc-driver-available-32-bit-version) for more information.
149149
150150
### Data modeling
151151

@@ -155,17 +155,17 @@ In .NET, you have three choices for modeling and manipulating data in memory aft
155155

156156
- [LINQ to SQL](../data-tools/linq-to-sql-tools-in-visual-studio2.md): An earlier-generation object-relational mapper. It works well for less complex scenarios but is no longer in active development.
157157

158-
- [Datasets](../data-tools/dataset-tools-in-visual-studio.md): The oldest of the three modeling technologies. It is designed primarily for rapid development of "forms over data" applications in which you are not processing huge amounts of data or performing complex queries or transformations. A DataSet object consists of DataTable and DataRow objects that logically resemble SQL Database objects much more than .NET objects. For relatively simple applications based on SQL data sources, datasets might still be a good choice.
158+
- [Datasets](../data-tools/dataset-tools-in-visual-studio.md): The oldest of the three modeling technologies. It's designed primarily for rapid development of "forms over data" applications in which you aren't processing huge amounts of data or performing complex queries or transformations. A DataSet object consists of DataTable and DataRow objects that logically resemble SQL Database objects much more than .NET objects. For relatively simple applications based on SQL data sources, datasets might still be a good choice.
159159

160-
There is no requirement to use any of these technologies. In some scenarios, especially where performance is critical, you can simply use a DataReader object to read from the database and copy the values that you need into a collection object such as List\<T>.
160+
There's no requirement to use any of these technologies. In some scenarios, especially where performance is critical, you can simply use a DataReader object to read from the database and copy the values that you need into a collection object such as List\<T>.
161161

162162
## Native C++
163163

164-
C++ applications that connect to SQL Server should use the [Microsoft® ODBC Driver 13.1 for SQL Server](https://www.microsoft.com/download/details.aspx?id=53339) in most cases. If the servers are linked, then OLE DB is necessary and for that you use the [SQL Server Native Client](/sql/relational-databases/native-client/sql-server-native-client). You can access other databases by using [ODBC](/sql/odbc/microsoft-open-database-connectivity-odbc?view=sql-server-2017&preserve-view=true) or OLE DB drivers directly. ODBC is the current standard database interface, but most database systems provide custom functionality that can't be accessed through the ODBC interface. OLE DB is a legacy COM data-access technology that is still supported but not recommended for new applications. For more information, see [Data Access in Visual C++](/cpp/data/data-access-in-cpp).
164+
C++ applications that connect to SQL Server should use the [Microsoft® ODBC Driver 13.1 for SQL Server](/sql/connect/odbc/download-odbc-driver-for-sql-server) in most cases. If the servers are linked, then OLE DB is necessary and for that you use the [SQL Server Native Client](/sql/relational-databases/native-client/sql-server-native-client). You can access other databases by using [ODBC](/sql/odbc/microsoft-open-database-connectivity-odbc?view=sql-server-2017&preserve-view=true) or OLE DB drivers directly. ODBC is the current standard database interface, but most database systems provide custom functionality that can't be accessed through the ODBC interface. OLE DB is a legacy COM data-access technology that is still supported but not recommended for new applications. For more information, see [Data Access in Visual C++](/cpp/data/data-access-in-cpp).
165165

166166
C++ programs that consume REST services can use the [C++ REST SDK](https://github.com/Microsoft/cpprestsdk).
167167

168-
Data modeling&mdash;Visual Studio does not provide an ORM layer for C++. [ODB](https://www.codesynthesis.com/products/odb/) is a popular open-source ORM for C++.
168+
Data modeling&mdash;Visual Studio doesn't provide an ORM layer for C++. [ODB](https://www.codesynthesis.com/products/odb/) is a popular open-source ORM for C++.
169169

170170
To learn more about connecting to databases from C++ apps, see [Visual Studio data tools for C++](../data-tools/visual-studio-data-tools-for-cpp.md).
171171

docs/debugger/debug-interface-access/idiadatasource.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,6 @@ DLL: msdia140.dll
7070

7171
## See also
7272

73-
- [Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md)
7473
- [`IDiaDataSourceEx`](../../debugger/debug-interface-access/idiadatasourceex.md)
74+
- [`IDiaDataSourceEx2`](../../debugger/debug-interface-access/idiadatasourceex2.md)
75+
- [Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md)

docs/debugger/debug-interface-access/idiadatasourceex.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.subservice: debug-diagnostics
1515

1616
# IDiaDataSourceEx
1717

18-
Initiates access to a source of debugging symbols.
18+
Initiates access to a source of debugging symbols and retrieves information about that source.
1919

2020
## Syntax
2121

@@ -38,7 +38,7 @@ The following table shows the methods of `IDiaDataSourceEx`.
3838

3939
## Remarks
4040

41-
A call to one of the load methods of the `IDiaDataSourceEx` interface opens the symbol source. A successful call to the [`IDiaDataSource::openSession`](../../debugger/debug-interface-access/idiadatasource-opensession.md) method returns an [`IDiaSession`](../../debugger/debug-interface-access/idiasession.md) interface that supports querying the data source. If the load method returns a file-related error then the [`IDiaDataSource::get_lastError`](../../debugger/debug-interface-access/idiadatasource-get-lasterror.md) method return value contains the file name associated with the error.
41+
A call to one of the load methods of the `IDiaDataSourceEx` interface opens the symbol source. A successful call to the [`IDiaDataSource::openSession`](../../debugger/debug-interface-access/idiadatasource-opensession.md) method returns an [`IDiaSession`](../../debugger/debug-interface-access/idiasession.md) interface that supports querying the data source. If the load method returns a file-related error, then the [`IDiaDataSource::get_lastError`](../../debugger/debug-interface-access/idiadatasource-get-lasterror.md) method return value contains the file name associated with the error.
4242

4343
## Notes for Callers
4444

@@ -70,4 +70,6 @@ DLL: msdia140.dll
7070

7171
## See also
7272

73+
- [`IDiaDataSource`](../../debugger/debug-interface-access/idiadatasource.md)
74+
- [`IDiaDataSourceEx2`](../../debugger/debug-interface-access/idiadatasourceex2.md)
7375
- [Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md)
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
description: Retrieves all names of named streams within the datasource that match the optionally given pattern.
3+
title: "IDiaDataSourceEx2::findNamedStreams"
4+
ms.date: "11/18/2024"
5+
ms.topic: "reference"
6+
dev_langs:
7+
- "C++"
8+
helpviewer_keywords:
9+
- "IDiaDataSourceEx2::findNamedStreams method"
10+
author: "grantri"
11+
ms.author: "grantri"
12+
manager: mijacobs
13+
ms.subservice: debug-diagnostics
14+
---
15+
16+
# IDiaDataSourceEx2::findNamedStreams
17+
18+
Retrieves all the names of named streams within the datasource that match the optionally given pattern.
19+
20+
## Syntax
21+
22+
```C++
23+
HRESULT findNamedStreams (
24+
[in, optional] LPCOLESTR name,
25+
[in] DWORD compareFlags,
26+
[out] IDiaEnumNamedStreams** ppResult
27+
);
28+
```
29+
30+
## Parameters
31+
32+
`[in, optional] name`
33+
34+
Optionally specifies the name of the streams to be retrieved. Set to `NULL` for all streams to be retrieved.
35+
36+
`[in] compareFlags`
37+
38+
Specifies the comparison options applied to name matching. Values from the [`NameSearchOptions` Enumeration](../../debugger/debug-interface-access/namesearchoptions.md) enumeration can be used alone or in combination. If `name` is `NULL`, this parameter must be `nsNone`.
39+
40+
`[out] ppResult`
41+
42+
Returns an [`IDiaEnumNamedStreams`](../../debugger/debug-interface-access/idiaenumnamedstreams.md) object that contains the list of named streams retrieved.
43+
44+
## Return Value
45+
46+
If successful, returns `S_OK`; otherwise, returns an error code.
47+
48+
## Example
49+
50+
The following example shows how to find all named streams that begin with `"sourcelink"` and dump their length.
51+
52+
```C++
53+
CComPtr<IDiaEnumNamedStreams> pEnum;
54+
HRESULT hr = pDataSource->findNamedStreams( L"sourcelink*", nsCaseSensitive | nsRegularExpression, &pEnum );
55+
do {
56+
CComBSTR name;
57+
hr = pEnum->Next(&name);
58+
if (FAILED(hr)) {
59+
// report the error
60+
return hr;
61+
}
62+
if (hr != S_OK) {
63+
// End of the matches
64+
return S_OK;
65+
}
66+
ULONGLONG cb = 0;
67+
hr = pDataSource->getStreamSize(name.m_str, &cb);
68+
if (FAILED(hr)) {
69+
// report the error
70+
return hr;
71+
}
72+
printf("Stream Name: \"%ls\", Stream Size: %llu byte(s)\n", name.m_str, cb);
73+
} while (true);
74+
```
75+
76+
## See also
77+
78+
- [Overview](../../debugger/debug-interface-access/overview-debug-interface-access-sdk.md)
79+
- [`IDiaEnumNamedSstreams`](../../debugger/debug-interface-access/idiaenumnamedstreams.md)
80+
- [`IDiaDataSourceEx2`](../../debugger/debug-interface-access/idiadatasourceex2.md)
81+
- [`NameSearchOptions` Enumeration](../../debugger/debug-interface-access/namesearchoptions.md)
82+
- [`IDiaDataSourceEx::getStreamSize`](../../debugger/debug-interface-access/idiadatasourceex-getstreamsize.md)
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
description: Initiates access to a source of debugging symbols. Extends IDiaDataSource and IDiaDataSourceEx.
3+
title: IDiaDataSourceEx2
4+
ms.date: "11/18/2024"
5+
ms.topic: "reference"
6+
dev_langs:
7+
- "C++"
8+
helpviewer_keywords:
9+
- "IDiaDataSourceEx2 interface"
10+
author: "grantri"
11+
ms.author: "grantri"
12+
manager: mijacobs
13+
ms.subservice: debug-diagnostics
14+
---
15+
16+
# IDiaDataSourceEx2
17+
18+
Initiates access to a source of debugging symbols and retrieves information about that source.
19+
20+
## Syntax
21+
22+
`IDiaDataSourceEx2 : IDiaDataSourceEx`
23+
24+
## Methods in Vtable Order
25+
26+
The following table shows the methods of `IDiaDataSourceEx2`.
27+
28+
|Method|Description|
29+
|------------|-----------------|
30+
|[`IDiaDataSourceEx2::findNamedStreams`](../../debugger/debug-interface-access/idiadatasourceex2-findnamedstreams.md)|Retrieves all names of named streams within the datasource that match the optionally given pattern.|
31+
32+
## Remarks
33+
34+
A call to one of the load methods of the `IDiaDataSource` interface opens the symbol source. A successful call to the [`IDiaDataSource::openSession`](../../debugger/debug-interface-access/idiadatasource-opensession.md) method returns an [`IDiaSession`](../../debugger/debug-interface-access/idiasession.md) interface that supports querying the data source. If the load method returns a file-related error, then the [`IDiaDataSource::get_lastError`](../../debugger/debug-interface-access/idiadatasource-get-lasterror.md) method return value contains the file name associated with the error.
35+
36+
## Notes for Callers
37+
38+
This interface is obtained by calling the `CoCreateInstance` function with the class identifier `CLSID_DiaSource` and the interface ID of `IID_IDiaDataSourceEx`, or by calling `QueryInterface` on an existing `IDiaDataSource` interface pointer. The example shows how this interface is obtained.
39+
40+
## Example
41+
42+
```c++
43+
44+
IDiaDataSource* pSource;
45+
HRESULT hr = CoCreateInstance(CLSID_DiaSource,
46+
NULL,
47+
CLSCTX_INPROC_SERVER,
48+
IID_IDiaDataSourceEx2,
49+
(void**) &pSource);
50+
if (FAILED(hr))
51+
{
52+
// Report error and exit
53+
}
54+
```
55+
56+
## Requirements
57+
58+
Header: Dia2.h
59+
60+
Library: diaguids.lib
61+
62+
DLL: msdia140.dll
63+
64+
## See also
65+
66+
- [`IDiaDataSource`](../../debugger/debug-interface-access/idiadatasource.md)
67+
- [`IDiaDataSourceEx`](../../debugger/debug-interface-access/idiadatasourceex.md)
68+
- [Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
description: Creates a new enumerator that contains the same enumeration state as the current enumerator.
3+
title: "IDiaEnumNamedStreams::Clone"
4+
ms.date: "11/19/2024"
5+
ms.topic: "reference"
6+
dev_langs:
7+
- "C++"
8+
helpviewer_keywords:
9+
- "IDiaEnumNamedStreams::Clone method"
10+
author: "grantri"
11+
ms.author: "grantri"
12+
manager: mijacobs
13+
ms.subservice: debug-diagnostics
14+
---
15+
16+
# IDiaEnumNamedStreams::Clone
17+
18+
Creates a new enumerator that contains the same enumeration state as the current enumerator.
19+
20+
## Syntax
21+
22+
```c++
23+
HRESULT Clone (
24+
[out] IDiaEnumNamedStreams** ppEnum
25+
);
26+
```
27+
28+
## Parameters
29+
30+
`[out] ppEnum`
31+
32+
Returns an [`IDiaEnumNamedStreams`](../../debugger/debug-interface-access/idiaenumnamedstreams.md) object that contains a duplicate of this enumerator. The named streams aren't duplicated, only the enumerator.
33+
34+
## Return Value
35+
36+
If successful, returns `S_OK`; otherwise, returns an error code.
37+
38+
## See also
39+
40+
- [`IDiaEnumNamedStreams`](../../debugger/debug-interface-access/idiaenumnamedstreams.md)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
description: Retrieves the number of named streams.
3+
title: "IDiaEnumNamedStreamss::get_Count"
4+
ms.date: "11/18/2024"
5+
ms.topic: "reference"
6+
dev_langs:
7+
- "C++"
8+
helpviewer_keywords:
9+
- "IDiaEnumNamedStreams::get_Count method"
10+
author: "grantri"
11+
ms.author: "grantri"
12+
manager: mijacobs
13+
ms.subservice: debug-diagnostics
14+
---
15+
16+
# IDiaEnumNamedStreams::get_Count
17+
18+
Retrieves the number of named streams retrieved by this enumerator.
19+
20+
## Syntax
21+
22+
```c++
23+
HRESULT get_Count (
24+
[out] LONG* pRetVal
25+
);
26+
```
27+
28+
## Parameters
29+
30+
`[out] pRetVal`
31+
32+
Returns the number of named streams in this enumeration.
33+
34+
## Return Value
35+
36+
If successful, returns `S_OK`; otherwise, returns an error code.
37+
38+
## See also
39+
40+
- [`IDiaEnumNamedStreams`](../../debugger/debug-interface-access/idiaenumnamedstreams.md)

0 commit comments

Comments
 (0)