This document is archived and information here might be outdated. Recommended version. |
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,
System.String* dbName,
System.String* OwnerName,
System.String* 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*
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.
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"
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);
}