WM-4571 Could not execute JDBC batch update error when update exceeds length

Implemented error detecting logic in as much generic way as I could.  Currently tested on MySQL, Postgres, Oracle and SQLServer.