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


ISQLSyntax.ParseTableName Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (GeoDatabase)  

ISQLSyntax.ParseTableName Method

Given a table name, determine its qualification parts.

[Visual Basic .NET]
Public Sub ParseTableName ( _
    ByVal FullName As String, _
    ByRef dbName As String, _
    ByRef OwnerName As String, _
    ByRef TableName As String _
)
[C#]
public void ParseTableName (
    string FullName,
    ref string dbName,
    ref string OwnerName,
    ref string TableName
);
[C++]
HRESULT ParseTableName(
  BSTR FullName,
  BSTR* dbName,
  BSTR* OwnerName,
  BSTR* TableName
);
[C++]

Parameters FullName [in] FullName is a parameter of type BSTR dbName [out] dbName is a parameter of type BSTR OwnerName [out] OwnerName is a parameter of type BSTR TableName [out] TableName is a parameter of type BSTR

Product Availability

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

Errors Returned

FDO_E_SE_INVALID_PARAM_VALUE: Invalid parameter supplied as input. A database parameter may have been supplied to an underlying DBMS that does not support multiple databases. For example, a FullName argument of vtest.gdb.mytable is supplied to an Oracle database.

Remarks

Applications should use the ParseTableName method to split the fully qualified name of a table into its components (database, owner, table).  ParseTableName can also be used to return the components of any fully qualified name of a dataset such as feature classes, feature datasets, geometric networks and topologies.

Applications that wish to be RDBMS independent should not assume that �.� is the delimiter used to separate the components of a fully qualified dataset name. Use the QualifyTableName method to determine the qualified name of a dataset for a given workspace.

The FullName parameter refers to the fully qualified name of the dataset and is returned by the  IDataset::Name property for a dataset in a geodatabase and the IDatasetName::Name property for a dataset name object. Both methods return the fully qualified name for the dataset.

Empty strings will be returned for arguments that do not apply to the underlying DBMS. For example, supplying a FullName parameter of "MyTable" to a Personal or File Geodatabase will result in:

dbName=""

ownerName = ""

TableName="MyTable"

While supplying a FullName parameter of "gdb.MyTable" to an ArcSDE Geodatabase on Oracle will result in:

dbName=""

ownerName = "gdb"

TableName="MyTable"

[C#]


    public void ISQLSyntax__ParseTableName(IDataset dataset)
    {
        string nameOfDatabase;
        string nameOfOwner;
        string nameOfTable;
        string datasetName=dataset.Name;

        ISQLSyntax sqlSyntax=(ISQLSyntax)dataset.Workspace;
        sqlSyntax.ParseTableName(datasetName, out nameOfDatabase, out nameOfOwner, out nameOfTable);

        Console.WriteLine("The database name is {0}", nameOfDatabase);
        Console.WriteLine("The owner name is {0}", nameOfOwner);
        Console.WriteLine("The table name is {0}", nameOfTable);
    }

See Also

ISQLSyntax Interface