in reply to Can't execute sql

As already noted, you're dereferencing $dbh, which may be valid if we could see what you're passing in to get_stripe_count(). Show that code too for more help.

What you're passing as SQL: execute sp_dbsize D_CHRIS :: is not SQL in any database I'm aware of, but I may just not have used enough databases. What database is it you're using?