I am writing an application that needs to use a unique index key that may be in the table that I have built a recordset from. If there isn't a unique index key there will always at least one autocount field.
I am populating a drawing from data of XY coords in the recordset and each element of that drawing needs to have a unique reference back to the table. ie, when I click on an element the correct recordest will be selected. I don't know in advance what the name of the unique index field or the autocount id field.
Find a unique index key field
if found return field name
Find a field which is an autoupdate type
return field name
Please show code, I am using MDAC 2.5