Fix bug: setAutoCommit() only if connection is created.