Skip to content

Commit ff565c4

Browse files
author
mtx48109
committed
additional class csimplerow
1 parent 7884cbf commit ff565c4

10 files changed

+112
-221
lines changed

.openpublishing.redirection.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,6 +1575,36 @@
15751575
"redirect_url": "/cpp/data/oledb/crowsetimpl-class#validatecommandid",
15761576
"redirect_document_id": false
15771577
},
1578+
{
1579+
"source_path": "docs/data/oledb/csimplerow-addrefrow.md",
1580+
"redirect_url": "/cpp/data/oledb/csimplerow-class#addrefrow",
1581+
"redirect_document_id": false
1582+
},
1583+
{
1584+
"source_path": "docs/data/oledb/csimplerow-compare.md",
1585+
"redirect_url": "/cpp/data/oledb/csimplerow-class#compare",
1586+
"redirect_document_id": false
1587+
},
1588+
{
1589+
"source_path": "docs/data/oledb/csimplerow-csimplerow.md",
1590+
"redirect_url": "/cpp/data/oledb/csimplerow-class#csimplerow",
1591+
"redirect_document_id": false
1592+
},
1593+
{
1594+
"source_path": "docs/data/oledb/csimplerow-m-dwref.md",
1595+
"redirect_url": "/cpp/data/oledb/csimplerow-class#dwref",
1596+
"redirect_document_id": false
1597+
},
1598+
{
1599+
"source_path": "docs/data/oledb/csimplerow-m-irowset.md",
1600+
"redirect_url": "/cpp/data/oledb/csimplerow-class#irowset",
1601+
"redirect_document_id": false
1602+
},
1603+
{
1604+
"source_path": "docs/data/oledb/csimplerow-releaserow.md",
1605+
"redirect_url": "/cpp/data/oledb/csimplerow-class#releaserow",
1606+
"redirect_document_id": false
1607+
},
15781608
{
15791609
"source_path": "docs/dotnet/index.md",
15801610
"redirect_url": "/cpp/dotnet/dotnet-programming-with-cpp-cli-visual-cpp",

docs/data/oledb/TOC.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,6 @@
128128
## [OLE DB Provider Templates Reference](ole-db-provider-templates-reference.md)
129129
### [CRowsetImpl Class](crowsetimpl-class.md)
130130
### [CSimpleRow Class](csimplerow-class.md)
131-
#### [CSimpleRow::AddRefRow](csimplerow-addrefrow.md)
132-
#### [CSimpleRow::Compare](csimplerow-compare.md)
133-
#### [CSimpleRow::CSimpleRow](csimplerow-csimplerow.md)
134-
#### [CSimpleRow::m_dwRef](csimplerow-m-dwref.md)
135-
#### [CSimpleRow::m_iRowset](csimplerow-m-irowset.md)
136-
#### [CSimpleRow::ReleaseRow](csimplerow-releaserow.md)
137131
### [CUtlProps Class](cutlprops-class.md)
138132
#### [CUtlProps::GetPropValue](cutlprops-getpropvalue.md)
139133
#### [CUtlProps::IsValidValue](cutlprops-isvalidvalue.md)

docs/data/oledb/crowsetimpl-class.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,24 @@ class CRowsetImpl :  
5454
5555
|||
5656
|-|-|
57-
|[NameFromDBID](../../data/oledb/crowsetimpl-namefromdbid.md)|Extracts a string from a `DBID` and copies it to the *bstr* passed in.|
58-
|[SetCommandText](../../data/oledb/crowsetimpl-setcommandtext.md)|Validates and stores the `DBID`s in the two strings ([m_strCommandText](../../data/oledb/crowsetimpl-m-strcommandtext.md) and [m_strIndexText](../../data/oledb/crowsetimpl-m-strindextext.md)).|
57+
|[NameFromDBID](#namefromdbid)|Extracts a string from a `DBID` and copies it to the *bstr* passed in.|
58+
|[SetCommandText](#setcommandtext)|Validates and stores the `DBID`s in the two strings ([m_strCommandText](../../data/oledb/crowsetimpl-m-strcommandtext.md) and [m_strIndexText](../../data/oledb/crowsetimpl-m-strindextext.md)).|
5959
6060
### Overridable Methods
6161
6262
|||
6363
|-|-|
64-
|[GetColumnInfo](../../data/oledb/crowsetimpl-getcolumninfo.md)|Retrieves column information for a particular client request.|
65-
|[GetCommandFromID](../../data/oledb/crowsetimpl-getcommandfromid.md)|Checks to see if either or both parameters contain string values, and if so, copies the string values to the data members [m_strCommandText](../../data/oledb/crowsetimpl-m-strcommandtext.md) and [m_strIndexText](../../data/oledb/crowsetimpl-m-strindextext.md).|
66-
|[ValidateCommandID](../../data/oledb/crowsetimpl-validatecommandid.md)|Checks to see if either or both `DBID`s contain string values, and if so, copies them to its data members [m_strCommandText](../../data/oledb/crowsetimpl-m-strcommandtext.md) and [m_strIndexText](../../data/oledb/crowsetimpl-m-strindextext.md).|
64+
|[GetColumnInfo](#getcolumninfo)|Retrieves column information for a particular client request.|
65+
|[GetCommandFromID](#getcommandfromid)|Checks to see if either or both parameters contain string values, and if so, copies the string values to the data members [m_strCommandText](../../data/oledb/crowsetimpl-m-strcommandtext.md) and [m_strIndexText](../../data/oledb/crowsetimpl-m-strindextext.md).|
66+
|[ValidateCommandID](#validatecommandid)|Checks to see if either or both `DBID`s contain string values, and if so, copies them to its data members [m_strCommandText](../../data/oledb/crowsetimpl-m-strcommandtext.md) and [m_strIndexText](../../data/oledb/crowsetimpl-m-strindextext.md).|
6767
6868
### Data Members
6969
7070
|||
7171
|-|-|
72-
|[m_rgRowData](../../data/oledb/crowsetimpl-m-rgrowdata.md)|By default, a `CAtlArray` that templatizes on the user record template argument to `CRowsetImpl`. Another array type class can be used by changing the `ArrayType` template argument to `CRowsetImpl`.|
73-
|[m_strCommandText](../../data/oledb/crowsetimpl-m-strcommandtext.md)|Contains the rowset's initial command.|
74-
|[m_strIndexText](../../data/oledb/crowsetimpl-m-strindextext.md)|Contains the rowset's initial index.|
72+
|[m_rgRowData](#rgrowdata)|By default, a `CAtlArray` that templatizes on the user record template argument to `CRowsetImpl`. Another array type class can be used by changing the `ArrayType` template argument to `CRowsetImpl`.|
73+
|[m_strCommandText](#strcommandtext)|Contains the rowset's initial command.|
74+
|[m_strIndexText](#strindextext)|Contains the rowset's initial index.|
7575
7676
## Remarks
7777
`CRowsetImpl` provides overrides in the form of static upcasts. The methods control the manner in which a given rowset will validate command text. You can create your own `CRowsetImpl`-style class by making your implementation interfaces multiple-inherited. The only method for which you must provide implementation is `Execute`. Depending on what type of rowset you are creating, the creator methods will expect different signatures for `Execute`. For example, if you are using a `CRowsetImpl`-derived class to implement a schema rowset, the `Execute` method will have the following signature:

docs/data/oledb/csimplerow-addrefrow.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

docs/data/oledb/csimplerow-class.md

Lines changed: 74 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ ms.custom: ""
44
ms.date: "11/04/2016"
55
ms.technology: ["cpp-data"]
66
ms.topic: "reference"
7-
f1_keywords: ["CSimpleRow", "ATL::CSimpleRow", "ATL.CSimpleRow"]
7+
f1_keywords: ["CSimpleRow", "ATL::CSimpleRow", "ATL.CSimpleRow", "CSimpleRow::AddRefRow", "AddRefRow", "ATL.CSimpleRow.AddRefRow", "ATL::CSimpleRow::AddRefRow", "CSimpleRow.AddRefRow", "CSimpleRow.Compare", "CSimpleRow::Compare", "CSimpleRow", "ATL::CSimpleRow::CSimpleRow", "CSimpleRow.CSimpleRow", "ATL.CSimpleRow.CSimpleRow", "CSimpleRow::CSimpleRow", "ATL::CSimpleRow::ReleaseRow", "CSimpleRow::ReleaseRow", "ReleaseRow", "CSimpleRow.ReleaseRow", "ATL.CSimpleRow.ReleaseRow", "CSimpleRow.m_dwRef", "CSimpleRow::m_dwRef", "CSimpleRow::m_iRowset", "CSimpleRow.m_iRowset"]
88
dev_langs: ["C++"]
9-
helpviewer_keywords: ["CSimpleRow class"]
9+
helpviewer_keywords: ["CSimpleRow class", "AddRefRow method", "Compare method", "CSimpleRow class, constructor", "ReleaseRow method", "m_dwRef", "m_iRowset"]
1010
ms.assetid: 06d9621d-60cc-4508-8b0c-528d1b1a809b
1111
author: "mikeblome"
1212
ms.author: "mblome"
@@ -20,32 +20,94 @@ Provides a default implementation for the row handle, which is used in the [IRow
2020
```cpp
2121
class CSimpleRow
2222
```
23-
23+
24+
## Requirements
25+
**Header:** atldb.h
26+
2427
## Members
2528
2629
### Methods
2730
2831
|||
2932
|-|-|
30-
|[AddRefRow](../../data/oledb/csimplerow-addrefrow.md)|Adds a reference count to an existing row handle.|
31-
|[Compare](../../data/oledb/csimplerow-compare.md)|Compares two rows to see if they refer to the same row instance.|
32-
|[CSimpleRow](../../data/oledb/csimplerow-csimplerow.md)|The constructor.|
33-
|[ReleaseRow](../../data/oledb/csimplerow-releaserow.md)|Releases rows.|
33+
|[AddRefRow](#addrefrow)|Adds a reference count to an existing row handle.|
34+
|[Compare](#compare)|Compares two rows to see if they refer to the same row instance.|
35+
|[CSimpleRow](#csimplerow)|The constructor.|
36+
|[ReleaseRow](#releaserow)|Releases rows.|
3437
3538
### Data Members
3639
3740
|||
3841
|-|-|
39-
|[m_dwRef](../../data/oledb/csimplerow-m-dwref.md)|Reference count to an existing row handle.|
40-
|[m_iRowset](../../data/oledb/csimplerow-m-irowset.md)|An index to the rowset representing the cursor.|
42+
|[m_dwRef](#dwref)|Reference count to an existing row handle.|
43+
|[m_iRowset](#irowset)|An index to the rowset representing the cursor.|
4144
4245
## Remarks
4346
A row handle is logically a unique tag for a result row. `IRowsetImpl` creates a new `CSimpleRow` for every row requested in [IRowsetImpl::GetNextRows](../../data/oledb/irowsetimpl-getnextrows.md). `CSimpleRow` can also be replaced with your own implementation of the row handle, as it is a default template argument to `IRowsetImpl`. The only requirement to replacing this class is to have the replacement class provide a constructor that accepts a single parameter of type **LONG**.
47+
48+
## <a name="addrefrow"></a> CSimpleRow::AddRefRow
49+
Adds a reference count to an existing row handle in a thread-safe manner.
4450
45-
## Requirements
46-
**Header:** atldb.h
51+
### Syntax
52+
53+
```cpp
54+
DWORD AddRefRow();
55+
56+
```
57+
58+
## <a name="compare"></a> CSimpleRow::Compare
59+
Compares two rows to see if they refer to the same row instance.
60+
61+
### Syntax
62+
63+
```cpp
64+
HRESULT Compare(CSimpleRow* pRow);
65+
```
66+
67+
#### Parameters
68+
*pRow*
69+
A pointer to a `CSimpleRow` object.
70+
71+
### Return Value
72+
An HRESULT value, usually S_OK, indicating the two rows are the same row instance, or S_FALSE, indicating the two rows are different. See [IRowsetIdentity::IsSameRow](https://msdn.microsoft.com/library/ms719629.aspx) in the *OLE DB Programmer's Reference* for other possible return values.
73+
74+
## <a name="csimplerow"></a> CSimpleRow::CSimpleRow
75+
The constructor.
76+
77+
### Syntax
78+
79+
```cpp
80+
CSimpleRow(DBCOUNTITEM iRowsetCur);
81+
```
82+
83+
#### Parameters
84+
*iRowsetCur*
85+
[in] Index to the current rowset.
86+
87+
### Remarks
88+
Sets [m_iRowset](../../data/oledb/csimplerow-m-irowset.md) to *iRowsetCur*.
89+
90+
## <a name="dwref"></a> CSimpleRow::m_dwRef
91+
Reference count to an existing row handle.
92+
93+
### Syntax
94+
95+
```cpp
96+
DWORD m_dwRef;
97+
98+
```
99+
100+
## <a name="irowset"></a> CSimpleRow::m_iRowset
101+
Index to the rowset representing the cursor.
102+
103+
### Syntax
104+
105+
```cpp
106+
KeyType m_iRowset;
107+
108+
```
47109

48110
## See Also
49111
[OLE DB Provider Templates](../../data/oledb/ole-db-provider-templates-cpp.md)
50112
[OLE DB Provider Template Architecture](../../data/oledb/ole-db-provider-template-architecture.md)
51-
[IRowsetImpl Class](../../data/oledb/irowsetimpl-class.md)
113+
[IRowsetImpl Class](../../data/oledb/irowsetimpl-class.md)

docs/data/oledb/csimplerow-compare.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/data/oledb/csimplerow-csimplerow.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

docs/data/oledb/csimplerow-m-dwref.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

docs/data/oledb/csimplerow-m-irowset.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)