I am trying to know the primary key( I mean "PK" not "Required" ) of a table. In VB, Connection's OpenSchema(adOpenPrimaryKey) works fine with SQL Server and Oracle i.e. returns only those fields in the database which are Primary Keys in their respective Tables but when i use this function with MS Access it returns some binary values which are not understandable.
I need to know the primary key of a Table in MS Access on the fly using Visual Basic. Optional(The Schema should be returned as a Recordset as it is for SQL Server and Oracle)
On the web, i found a way through DAO's Table.Field.Index property, But i am using ADO 2.6.
I repeate again:
How to know the primary key of a table in MS Access on the fly using Visual Basic-ADO 2.6 ?