Fixed update condition.
Added jdbc connection.