English

How To: Enable Select by Attribute on an OLE DB table

Summary

An OLE DB table that has a unique, not null, indexed field can support selections. This field can be used as a pseudo ObjectID field. In addition, any OLE DB table that has such an index will be able to participate fully in a relate operation; for example, with a spatial data set. Selection sets identified in the spatial data set may then be propagated to the related OLE DB table.

If the OLE DB table does not have a suitable field and you wish to enable Select by Attribute/relate the table to other data sources, add a new field.

Procedure

Add a long integer field to the table and create a unique, not null index for it.
Populate the field with integer values, making sure all values are unique and no fields are empty.

Note:
If the OLE DB table's data source is an Access table, the primary key field must be of data type AutoNumber for the field to be recognized as a pseudo ObjectID. An index is not required.