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

Access Connection Properties of SDE Standalone Table

$
0
0
To All ArcObjects Developers:

I am writing an Add_In to change the properties of a standalone SDE table in ArcMap.

I have the following code that I thought would get the connection properties, but it keeps crashing the Add-In.

pStndAloneTbl = pTableColl.StandaloneTable(k)

'Instantiate the property set object
pPropset = New PropertySet

pDataLayer2 = pStndAloneTbl

pDatasetName2 = pDataLayer2.DataSourceName
pWorkSpaceName2 = pDatasetName2.WorkspaceName

pPropset = pWorkSpaceName2.ConnectionProperties


The code crashes at pDatasetName2 = pDataLayer2.DataSourceName even though Intellisense tells me that the DataSourceName
method is available from the pDataLayer2 object.

Can anyone please tell me what I am doing wrong here as it seems to me like this code should work?

Any help or hints are greatly appreciated.

Viewing all articles
Browse latest Browse all 1374

Trending Articles