Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

How to delete an existing ITable in inMemoryWorkspace

$
0
0
Hi together!

I'm trying to delete an ITable in an inMemoryWorkspace but the following code doesn't work:

Code:

Public Sub deleteTableInWorkspace(ByVal pTable As ITable)
        Dim pDataset As IDataset
        pDataset = pTable
        CType(managerInMemoryWorkspace, IFeatureWorkspaceManage).DeleteByName(pDataset.FullName)
    End Sub

The code doesn't throw an exception but later I try to generate a new ITable with the same name:

Code:

Dim pTable As ITable = workspace.CreateTable(ITableName, pFields, Nothing, Nothing, "")
Now I get the following exception:

Code:

"Exception from HRESULT: 0x80040353"
I debugged my code and recognize that the IName object from my generated ITable is empty. Is this the problem why the deleteTableInWorkspace method doesn't work? But how can i fill the IName object from the Tbale with values?

Viewing all articles
Browse latest Browse all 1374

Trending Articles