A method to prevent loss of data of transistor-based memory unit including bulk, source and drain formed on bulk and first tunnel oxide, floating gate, second tunnel oxide and control gate stacked up on channel between source and drain is disclosed to include steps of: erasing the floating gate, using weak electric field inject small amount of electrons into floating gate, enabling small amount of electrons to remain in floating gate to keep channel between source and drain electrically conducted, enabling small amount of electrons in floating gate to repel against electrons in first tunnel oxide and second tunnel oxide so as avoid electron accumulation in first tunnel oxide and second tunnel oxide and allow normal data access floating gate, and using electric field of normal write to inject electrons in floating gate so as to prevent channel conduction between source and drain and allow writing data into floating gate.