implemented commit all
implemented open/close DB. cleaned up the SQLException handling.