This document is archived and information here might be outdated.  Recommended version.


IFeatureWorkspace.OpenTable Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IF > IFeatureWorkspace Interface > IFeatureWorkspace.OpenTable Method
ArcGIS Developer Help

IFeatureWorkspace.OpenTable Method

Opens an existing table.

[Visual Basic .NET]
Public Function OpenTable ( _
    ByVal Name As String _
) As ITable
[C#]
public ITable OpenTable (
    string Name
);
[C++]
HRESULT OpenTable(
  BSTR Name
);
[C++]
Parameters
Name [in]

Name is a parameter of type BSTR

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The OpenTable method can be used to open any existing table or object class in the workspace given its fully qualified name. The table object returned will always support the ITable interface. The returned table object will support additional interfaces depending on the type of table. For example, object classes will additionally support the IObjectClass interface.
Use the IDatabaseConnectionInfo interface to determine the User and Database (if applicable).  ISQLSyntax::QualifyTableName can be used to determine the fully qualified name for a table.  Use the NameExists method on the IWorkspace2 interface to determine if a table with the appropriate name exists in a geodatabase.
Some examples of how to use the name parameter of OpenTable are shown below:

For Coverage feature classes:
cover:feature("stream:arc")
For info tables:
cover:feature("stream.aat")
For Oracle tables:
gdb.Owners
For SQLServer tables:
fdo_data.gdb.Owners
For Informix tables:
bladetest2:gdb.Owners
The 4 tables associated with a Topology; T_#_DirtyAreas, T_#_PolyErrors, T_#_LineErrors and T_#_PointErrors cannot be directly edited. For this reason they cannot be opened and will fail with a general Geodatabase error.

See Also

IFeatureWorkspace Interface | IDatabaseConnectionInfo Interface

.NET Samples

Customizing schematic feature removal events Vehicle routing problem solver