Re: ADO OpenSchema( adSchemaPrimaryKeys , ...)



Bob Barrows [MVP] wrote:
...
Good job documenting this. I've been able to reproduce
this in SQL 2005 using both the SQLOLEDB and SQLNCLI
providers. This code:

Thanks - had my DBA recreate that script about 5 times distilling it
down to bare bones.

Produces this result:
test dbo TestReport ReportID 3 PKTestConstraint

Exactly! Note too, that if you call adSchemaIndexes, that reports it
correctly. Unfortunately, adSchemaIndexes doesn't help with
identifying the PrimaryKey, so I can't use it in place of
adSchemaPrimaryKeys.

I don't have an answer for you but I will run it by my fellow MVPs
and see if they can shed some light.

Thanks *so* much. I look forward to hearing what you/they find.

-Pete
.