Updated getAutoCommit() and setAutoCommit () to open a db connection when needed