danw
committed
on 09 May 01
tested and fixed the template query db api