Molecular memory devices based on dithienylethene switch modified ITO electrodes undergo reversible ring opening/closing both photo- and electro-chemically with non-destructive electrochemical readout.