tapsql: tds.c