' If not defined, add table to Business Rules Repository
strSQL = "INSERT INTO TAB_TABLE_M " _
& "(TAB_PHYSNAME_T, TAB_ENTLOGNAME_T) VALUES " _
& "('" & strTable & "', 'Auto-generated') "
cmd.CommandText = strSQL
cmd.Execute lngAffected
intTable = intTable + 1
' Write a message to the notepad for the added table
strText = "Table: " & strTable _
& " was in the database, but not in the Repository. " _
& "It has now been added to the Repository."
strText = AddNotePadLine(strText)
End If
rstMeta.Close
' Look at each column of the table in the system catalog
For Each col In tbl.Columns
strField = col.Name
' Is the column defined in the Business Rules Repository?
strSQL = "SELECT * FROM COL_COLUMN_M " _
& " WHERE TAB_PHYSNAME_T = '" & strTable & "' " _
& " AND COL_PHYSNAME_T ...