I am a new Arc Objects user, with little ESRI experience.
We are using VBA to create a spatial report on a Map Control using a mdb table. The mdb table contains a Lat and Long field, and this data is collected in the Access application.
For the reporting, we need to display a map with the locations from the mdb table.
My questions are:
- How do I access data in a mdb table, as spatial data? Does it have to be registered as spatial? I am not sure if this can be done at runtime or has to be done using Arc Catalog.
- At runtime, if the data from the mdb table is in a spatially recognized table, do I just create a new layer, set the symbology, and then set a "where" clause on the new layer?
Best Answer
You do not need to access it as a spatial table.
You can read them using the JET ENGINE/ODBC.Please see jburka's answer on how to access the access table.Once you have access to the table, you can show it as an event Layer.
Here is a sample, which shows how you can make an XY event layer, once you have table in a ITable:
http://resources.esri.com/help/9.3/arcgisengine/ArcObjects/esriGeoDatabase/Create_XYEventSource.htm