tables. There are 15+ sets of tables I am comparing. I am looking to
see what has changed between the "old" and "new" versions of the table.
Any changes get reported to an audit file which contains the index,
field name and field value of the records that have changed. I have
the changes nailed for modifications, but cannot seem to get a handle
on adds/deletes.
Due to the somewhat dynamic nature of the tables I am comparing, I
wanted to avoid having to create separate queries for each set of
tables. Here is the statement I am using to do the "Find Unmatched":
Set tmpb = db.OpenRecordset("Select * from " & btbl & " left join " &
ctbl & " on " & btbl & "." & cfield & " = " & ctbl & "." & cfield & "
Where " & ctbl & "." & cfield & " is null;")
btbl = baseline table, ctbl = current table, cfield = common field
between the tables
This runs just fine.
Now I want to see the actual fields that are part of this recordset.
From there, I will go field by field and append the field name and
field value into an audit table.
I have a hunch I should do something involving TableDef with this, but
cannot seem to figure it out.
Any ideas?