It looks like its using the template database api which has been superseded by the db_* apis.
You can probably write the missing template:: procedures to handle the queries.
For get_db_handle, the db_apis take of of database handles automatically.
You can probably also find the ACS 4.2 tcl procedures and use them in a newer OpenACS without changes.