Updating db_type_handle to use parameterized queries instead of concatenation.