Improved error handling for database calls.     Execute all SQL changes from client (NOT TESTED, currently by-passed)