Add db connection to basepage.