locked out..Need to change theme from file manager or sql

I’m locked out of my site which is displaying some theme message. I’ve deleted the currently used theme and the message still appears, the site should have fell back on the bp default theme. How can I change the theme for this site elsewhere?