ArcObjects Library Reference (GeoDatabase)  

IFeatureWorkspace.OpenTable Method

Opens an existing table.

[Visual Basic .NET]
Public Function OpenTable ( _
    ByVal Name As String _
) As ITable
public ITable OpenTable (
    string Name
HRESULT OpenTable(
  BSTR Name,
  ITable** Table


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.


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:
For info tables:
For Oracle tables:
For SQLServer tables:
For Informix tables:
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