strText = " Error: Table: " &
rstMeta("TAB_PHYSNAME_T") _
& " / Column: " & strField _
& " is in Repository, but not in database. " _
& "CANNOT DELETE IT BECAUSE IT IS USED IN RULES
AS TARGET."
strText = AddNotePadLine(strText)
intErr = intErr + 1
End If
' If OK, delete
If lngCount1 = 0 And lngCount2 = 0 Then
strSQL = "DELETE FROM COL_COLUMN_M " _
& " WHERE TAB_PHYSNAME_T = '" &
rstMeta("TAB_PHYSNAME_T") & "' " _
& " AND COL_PHYSNAME_T = '" & strField & "' "
cmd.CommandText = strSQL
cmd.Execute lngAffected
intDelCol = intDelCol + 1
' Write a message to the notepad
strText = "Table: " & rstMeta("TAB_PHYSNAME_T")
_
& " / Column: " & strField _
& " is in Repository, but not in database. " _
& "Deleted from Repository."
strText = AddNotePadLine(strText)
End If
End If