Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can an ODBC Oracle table attached by OLE within ArcMap be edited/updated by using ArcObjects? If so, what are the procedural steps for doing this? Are there code examples out there showing how to do this?

Thank You

share|improve this question
Why not just use instead? – Kirk Kuykendall Nov 17 '11 at 3:18
I'm not sure why you'd want to use ArcObjects to do that. Wouldn't it be more efficient to edit it using SQL through OLEDB? – Bill Dollins Nov 17 '11 at 11:29

I can understand why you would like to use ArcObjects instead of ADO to update or read the business tables.

When ArcMap connects to your Geodatabase, it establishes a dedicated connection called a Workspace. It seems like a waste of memory and resources to establish another connection via ADO to your geodatabase while you have an existing connection which you can use. This is especially valid when you have multiple users, spawning two connections for each user can seem inefficient.

To update or read your table from ArcMap you have to get hold of the workspace somehow. This easy way is to get it from the first layer. Following code is in VB.NET

Dim pWorkspace as IWorkspace
Dim pMxdoc as ImxDocument = application.document ' get the arcmap document
Dim pFLayer as IFeatureLayer = pMxdoc.FocusMap.Layers(0)
Dim pDS as IDataset = pFLayer.FeatureClass
pWorkspace = pDs.Workspace 

now that we have the workspace you can use it to open your table by name, and update the name field of record having object id 1235

Dim pFWorkspace As IFeatureWorkspace
Dim pTable As ITable = pFWorkspace.OpenTable("mytablename")

'start editing
Dim pEWorkspace As IWorkspaceEdit = pWorkspace

Dim pRow As IRow = pTable.GetRow(1235) 'get particular Row to update
pRow.Value(pRow.Fields.FindField("NAME")) = "A NEW NAME"

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.