ArcObjects Library Reference  (GeoDatabase)    

IFeatureWorkspace.OpenTable Method

Opens an existing table.

[Visual Basic 6.0]
Function OpenTable(
    ByVal Name As String _
) As ITable
[Visual Basic .NET]
Public Function OpenTable ( _
    ByVal Name As String _
) As ITable
[C#]
public ITable OpenTable (
    string Name
);
[Java]
public ITable openTable (
    String Name
)
throws
    IOException,
    AutomationException
[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, ObjectClasses 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 the 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

 


Feedback Send feedback on this page