Skip to content

Commit d50f079

Browse files
author
mtx48109
committed
added additional class
1 parent a391bcc commit d50f079

File tree

7 files changed

+75
-103
lines changed

7 files changed

+75
-103
lines changed

.openpublishing.redirection.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,16 @@
11351135
"redirect_url": "/cpp/data/oledb/ctable-class#open",
11361136
"redirect_document_id": false
11371137
},
1138+
{
1139+
"source_path": "docs/data/oledb/cxmlaccessor-getxmlcolumndata.md",
1140+
"redirect_url": "/cpp/data/oledb/cxmlaccessor-class#getxmlcolumndata",
1141+
"redirect_document_id": false
1142+
},
1143+
{
1144+
"source_path": "docs/data/oledb/cxmlaccessor-getxmlrowdata.md",
1145+
"redirect_url": "/cpp/data/oledb/cxmlaccessor-class#getxmlrowdata",
1146+
"redirect_document_id": false
1147+
},
11381148
{
11391149
"source_path": "docs/dotnet/index.md",
11401150
"redirect_url": "/cpp/dotnet/dotnet-programming-with-cpp-cli-visual-cpp",

docs/data/oledb/TOC.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@
122122
### [CStreamRowset Class](cstreamrowset-class.md)
123123
### [CTable Class](ctable-class.md)
124124
### [CXMLAccessor Class](cxmlaccessor-class.md)
125-
#### [CXMLAccessor::GetXMLColumnData](cxmlaccessor-getxmlcolumndata.md)
126-
#### [CXMLAccessor::GetXMLRowData](cxmlaccessor-getxmlrowdata.md)
127125
### [IRowsetNotifyImpl Class](irowsetnotifyimpl-class.md)
128126
#### [IRowsetNotifyImpl::OnFieldChange](irowsetnotifyimpl-onfieldchange.md)
129127
#### [IRowsetNotifyImpl::OnRowChange](irowsetnotifyimpl-onrowchange.md)

docs/data/oledb/cstreamrowset-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ template <class TAccessor = CAccessorBase>
2424
class CStreamRowset
2525
```
2626
27-
#### Parameters
27+
### Parameters
2828
*TAccessor*
2929
An accessor class.
3030

docs/data/oledb/ctable-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class CTable :
2424
public CAccessorRowset <TAccessor, TRowset>
2525
```
2626
27-
#### Parameters
27+
### Parameters
2828
*TAccessor*
2929
An accessor class.
3030

docs/data/oledb/cxmlaccessor-class.md

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ ms.custom: ""
44
ms.date: "11/04/2016"
55
ms.technology: ["cpp-data"]
66
ms.topic: "reference"
7-
f1_keywords: ["ATL::CXMLAccessor", "CXMLAccessor", "ATL.CXMLAccessor"]
7+
f1_keywords: ["ATL::CXMLAccessor", "CXMLAccessor", "ATL.CXMLAccessor",
8+
"ATL.CXMLAccessor.GetXMLColumnData", "CXMLAccessor::GetXMLColumnData", "CXMLAccessor.GetXMLColumnData", "ATL::CXMLAccessor::GetXMLColumnData", "GetXMLColumnData",
9+
"ATL::CXMLAccessor::GetXMLRowData", "ATL.CXMLAccessor.GetXMLRowData", "CXMLAccessor::GetXMLRowData", "CXMLAccessor.GetXMLRowData", "GetXMLRowData"]
810
dev_langs: ["C++"]
9-
helpviewer_keywords: ["CXMLAccessor class"]
11+
helpviewer_keywords: ["CXMLAccessor class", "GetXMLColumnData method", "GetXMLRowData method"]
1012
ms.assetid: c88c082c-ec2f-4351-8947-a330b15e448a
1113
author: "mikeblome"
1214
ms.author: "mblome"
@@ -20,28 +22,82 @@ Allows you to access data sources as string data when you have no knowledge of t
2022
```cpp
2123
class CXMLAccessor : public CDynamicStringAccessorW
2224
```
25+
26+
## Requirements
27+
**Header**: atldbcli.h
2328
2429
## Members
2530
2631
### Methods
2732
2833
|||
2934
|-|-|
30-
|[GetXMLColumnData](../../data/oledb/cxmlaccessor-getxmlcolumndata.md)|Retrieves the column information.|
31-
|[GetXMLRowData](../../data/oledb/cxmlaccessor-getxmlrowdata.md)|Retrieves the entire contents of a table by rows.|
35+
|[GetXMLColumnData](#getxmlcolumndata)|Retrieves the column information.|
36+
|[GetXMLRowData](#getxmlrowdata)|Retrieves the entire contents of a table by rows.|
3237
3338
## Remarks
3439
However, `CXMLAccessor` differs from `CDynamicStringAccessorW` in that it converts all data accessed from the data store as XML-formatted (tagged) data. This is especially useful for output to XML-aware Web pages. The XML tag names will match the data store's column names as closely as possible.
3540
3641
Use `CDynamicAccessor` methods to obtain column information. You use this column information to create an accessor dynamically at run time.
3742
38-
The column information is stored in a buffer created and managed by this class. Obtain column information using [GetXMLColumnData](../../data/oledb/cxmlaccessor-getxmlcolumndata.md) or obtain column data by rows using [GetXMLRowData](../../data/oledb/cxmlaccessor-getxmlrowdata.md).
43+
The column information is stored in a buffer created and managed by this class. Obtain column information using [GetXMLColumnData](#getxmlcolumndata) or obtain column data by rows using [GetXMLRowData](#getxmlrowdata).
3944
4045
## Example
4146
[!code-cpp[NVC_OLEDB_Consumer#14](../../data/oledb/codesnippet/cpp/cxmlaccessor-class_1.cpp)]
47+
48+
## <a name="getxmlcolumndata"></a> CXMLAccessor::GetXMLColumnData
49+
Retrieves the column type information of a table as XML-formatted string data, by column.
4250
43-
## Requirements
44-
**Header**: atldbcli.h
51+
### Syntax
52+
53+
```cpp
54+
HRESULT GetXMLColumnData(CSimpleStringW& strOutput) throw();
55+
```
56+
57+
#### Parameters
58+
*strOutput*
59+
[out] A reference to a string buffer containing the column type information to be retrieved. The string is formatted with XML tag names that match the data store's column names.
60+
61+
### Return Value
62+
One of the standard HRESULT values.
63+
64+
### Remarks
65+
The following shows how the column type information is formatted in XML. `type` specifies the column's data type. Note that the data types are based on OLE DB data types, not those of the database being accessed.
66+
67+
`<columninfo>`
68+
69+
`<column type = I2/> ColumnName`
70+
71+
`</columninfo>`
72+
73+
## <a name="getxmlrowdata"></a> CXMLAccessor::GetXMLRowData
74+
Retrieves the entire contents of a table as XML-formatted string data, by row.
75+
76+
### Syntax
77+
78+
```cpp
79+
HRESULT GetXMLRowData(CSimpleStringW& strOutput, 
80+
bool bAppend = false) throw();
81+
```
82+
83+
#### Parameters
84+
*strOutput*
85+
[out] A reference to a buffer containing the table data to be retrieved. The data is formatted as string data with XML tag names that match the data store's column names.
86+
87+
*bAppend*
88+
[in] A Boolean value specifying whether to append a string to the end of the output data.
89+
90+
### Return Value
91+
One of the standard HRESULT values.
92+
93+
### Remarks
94+
The following shows how the row data is formatted in XML. `DATA` below represents the row data. Use move methods to move to the desired row.
95+
96+
`<row>`
97+
98+
`<column name>DATA</column name>`
99+
100+
`</row>`
45101
46102
## See Also
47103
[OLE DB Consumer Templates](../../data/oledb/ole-db-consumer-templates-cpp.md)

docs/data/oledb/cxmlaccessor-getxmlcolumndata.md

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

docs/data/oledb/cxmlaccessor-getxmlrowdata.md

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

0 commit comments

Comments
 (0)