ArcObjects Library Reference (GeoDatabase)  

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,
  ITable** Table
);
[C++]

Parameters

Name [in]   Name is a parameter of type BSTR Table [out, retval]

  Table is a parameter of type ITable

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

.NET Snippets

Create Table |

.NET Samples

Customizing schematic feature removal events (Code Files: FeatureRemovalMgmt) | Vehicle routing problem solver (Code Files: frmVRPSolver) |

.NET Related Topics

Copying or loading data while preserving GlobalID values | Creating an address locator | Creating relationship classes | Creating tables | DataSourcesOleDB | Finding differences between versions | Geodatabase API best practices | How to create a dynamic geocoded feature class | How to geocode a table of addresses |