Click to See Complete Forum and Search --> : Scanning Schema/Relationships


Mike Hennessy
July 26th, 2000, 04:36 PM
A while back, I'd developed a C++ SQL statement generator that would accept any series of column names (which for convenience were written by the user as an aliased/descriptive name) and would produce an SQL string with all appropriate JOINS as determined by the relationships in the database(s).

Since it was dynamic, any changes to the relationships among tables would automatically be reflected in the SQL generator when next run. When started, the parser would scan the relationships among the tables and build various structures used by the parser.

Since there appears to be little documentation for VC++ developers as well as sample code using ADO, I was wondering if anyone knows or has iterated Access(mdb) tables for relationships using ADO?

Johnny101
July 26th, 2000, 06:12 PM
The best way to get at these objects is go through ADOX. it comes with ADO 2.1 and up. Set a reference "Microsoft ADO 2.1 Ext for DLL and Security". The dll name is msadox.dll. The MSDN has some good documentation at how to use these objects (at least for use in VB, anyway). You should be able to get all properties of any table using these.

hope this helps,

John

John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org