If you use db_multirow with the -local switch you can compile and eval a template locally:
openacs4:nscp 13> db_multirow -local people get_people "select first_names, last_name from persons"
openacs4:nscp 14> set template "<multiple name=people><tr><td>@people.first_names@</td><td>@people.last_name@</td></tr></multiple>"
openacs4:nscp 15> set code [template::adp_compile -string $template]
openacs4:nscp 16> set out [template::adp_eval code]
<tr><td>Dan</td><td>Wickstrom</td></tr>