DNN-3706 Better management for sql errors

Previously only errors for scripts were displayed. Added handling of messages for standard 'selects'