introducing overloaded functions TSQLTable.FieldAsInteger()
and several fixes about the newly introduce TID type