fix sql command error and reassign value to cgaEventLogIdCount