Use macros to query records because of nice error messages.