Do not try to SELECT * INTO <integer>

Also give more detail on failure

The whole error reporting code should be rewritten to always show the database error message. This commit does in a few place, but not everywhere.