You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[Open](../../data/oledb/ctable-open.md)|Opens the table.|
43
+
|[Open](#open)|Opens the table.|
41
44
42
45
## Remarks
43
46
See [CCommand](../../data/oledb/ccommand-class.md) for information on how to execute a command to access a rowset.
47
+
48
+
## <a name="open"></a> CTable::Open
49
+
Opens the table.
44
50
45
-
## Requirements
46
-
**Header:** atldbcli.h
51
+
### Syntax
52
+
53
+
```cpp
54
+
HRESULT Open(const CSession& session,
55
+
LPCWSTR wszTableName,
56
+
DBPROPSET* pPropSet = NULL,
57
+
ULONG ulPropSets = 0) throw ();
58
+
59
+
60
+
HRESULT Open(const CSession& session,
61
+
LPCSTR szTableName,
62
+
DBPROPSET* pPropSet = NULL,
63
+
ULONG ulPropSets = 0) throw ();
64
+
65
+
66
+
HRESULT Open(const CSession& session,
67
+
DBID& dbid,
68
+
DBPROPSET* pPropSet = NULL,
69
+
ULONG ulPropSets = 0) throw ();
70
+
```
71
+
72
+
#### Parameters
73
+
*session*
74
+
[in] The session for which the table is opened.
75
+
76
+
*wszTableName*
77
+
[in] The name of the table to open, passed as a Unicode string.
78
+
79
+
*szTableName*
80
+
[in] The name of the table to open, passed as an ANSI string.
81
+
82
+
*dbid*
83
+
[in] The `DBID` of the table to open.
84
+
85
+
*pPropSet*
86
+
[in] A pointer to an array of [DBPROPSET](https://msdn.microsoft.com/library/ms714367.aspx) structures containing properties and values to be set. See [Property Sets and Property Groups](https://msdn.microsoft.com/library/ms713696.aspx) in the *OLE DB Programmer's Reference* in the Windows SDK. The default value of NULL specifies no properties.
87
+
88
+
*ulPropSets*
89
+
[in] The number of [DBPROPSET](https://msdn.microsoft.com/library/ms714367.aspx) structures passed in the *pPropSet* argument.
90
+
91
+
### Return Value
92
+
A standard HRESULT.
93
+
94
+
### Remarks
95
+
For more details, see [IOpenRowset::OpenRowset](https://msdn.microsoft.com/library/ms716724.aspx) in the *OLE DB Programmer's Reference*.
47
96
48
97
## See Also
49
98
[OLE DB Consumer Templates](../../data/oledb/ole-db-consumer-templates-cpp.md)
50
99
[OLE DB Consumer Templates Reference](../../data/oledb/ole-db-consumer-templates-reference.md)
0 commit comments