Guest User

Untitled

a guest
Dec 11th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. def vertablaentera():
  2. tabla=cajan.get()
  3. while tabla!="familia" and tabla!="telefonos":
  4. tkMessageBox.showerror("Administrador","La tabla introducida es erronea")
  5. cajan.delete(0,END)
  6. break
  7. if tabla=="familia":
  8. cursor.execute("SELECT * FROM familia")
  9. verRegistros=cursor.fetchone()
  10. #la linea anterior utiliza fetchone y no fetchall porque el bucle de abajo recorre uno a uno los registros
  11. if not verRegistros:
  12. tkMessageBox.showinfo("Administrador","No existen datos")
  13. else:
  14. #tkMessageBox.showinfo("INFORMACIO SOLICITADA",verRegistros)
  15. id=0
  16. for row in cursor:
  17. tabla1.insert("",index="end",text=str(id),value=(row[1],row[2],row[3]))
  18. id+=1
Add Comment
Please, Sign In to add comment