Fix forgotten use of old DB API

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>