I'm adapting C++ objects to ADO and ADOX for unmanaged targets, and ADOX doesn't appear to be able to fully enumerate the database.
So, I want to know who I can do that in SQL - something SQL92 can handle, so that MySQL, MSSQL2000, Interbase and others will be compatible with the approach.
From ADOX, I can get the entire list of catalogs (databases), then the tables within them, and all fields within the table. What I can't get are the columns within the Indexes or Keys. If I can just figure out how to get that information from SQL, I'd be set.
ADOX has the collections that supposedly provides an enumeration of the "Fields" within the Index, or "Fields" within the key, but attempting to get the "Count" or an "Item" from that collection causes an exception for MySQL and MSDE (MS SQL 2000).
SQL Server isn't "object oriented" so you can't enumerate it like classes or collections. Instead, the information is stored in system table in the databases and in the master database. You can get information on fields and indexes from the syscolumns and sysindexes tables. You will have to know (or be prepared to learn) a lot about SQL Server's database engine if you want to do this.