Code: Alles auswählen
def refreshForm (self):
conn = dbtools.opendb ()
cursor = conn.cursor()
cursor.execute("""SELECT
name, vname, strasse, tel, mobil, email,
fax, web, plz, ort
from kontakte
where id = %s""", self.getDataId (self))
ergebnis = cursor.fetchall ()
conn.close ()
for row in ergebnis:
self.text_name.SetValue (row [0])
self.text_vname.SetValue (row [1])
self.text_strasse.SetValue (row [2])
self.text_tel.SetValue (row [3])
self.text_mobil.SetValue (row [4])
self.text_email.SetValue (row [5])
self.text_fax.SetValue (row [6])
self.text_web.SetValue (row [7])
self.text_plz.SetValue (row [8])
self.text_ort.SetValue (row [9])
Code: Alles auswählen
UnicodeDecodeError: 'utf8' codec can't decode byte 0xfc in position 6: invalid start byte