Chuck Atkinson came up with the answer: SQL_GET_NUM_COLS