Try looking here: http://developer.arsdigita.com/doc/acs-templating/api/multirow.html
I've used the multirow functions to process the output of db_multirow. I had to do some processing in TCL for one of my columns in a result set before I could use the datasource in the .adp page. I used multirow size, multirow get, and multirow set in a loop outside of the db_multirow call to directly access the column names/values.
I hope this helps.