Hey James-
I used the OpenSchema and the adSchemaPrimaryKeys, but it only returns the TABLENAME. The TABLECATALOG field is always empty as is the TABLESCHEMA field. I also tried using the adSchemaIndexes constant, but that only returns the INDEXNAME and the TABLENAME and Type. Type is easy to get anyway... Under the INDEXNAME I get "PrimaryKey" for one value. Other values seem to be picked from outside the table. Here is what I used to open a recordset:
Set rst = conn.OpenSchema(adSchemaIndexes, Array(Empty, Empty, Empty, Empty, "Orders"))
This is odd because some values for INDEX_NAME are not even in the Orders table at all! I am baffled as to how this works. Any help is appreciated.
UPDATE
I just figured it out. The OpenSchema Method thing lists only three field names for adSchemaIndexes. Actually, there are 25 fields. I was playing around and changed my code. I added this: For x = 0 to rst.Fields.Count - 1 and then I just message boxed all the values. The field name popped up at around x = 23. Hehehehe Sorry about that. Hope this helps anyone else with a similar problem.
Enter your message below
Sign in or Join us (it's free).