title: How to output sqlite3 data in tkinter treeview
body: <p>Am having issue with how output all records in my <code>sqlite3</code>db into <code>tkinter treeview</code>.It outputs only the last record in the <code>db</code> and also the records doesn't appear at the column specified for it.The <code>print</code> method print all the <code>db</code> records to my terminal but doesn't output all the records to the <code>treeview</code> widget. </p>
  
  <p>Your suggestions are welcome to achieve this </p>
  
  <pre><code>from tkinter import ttk
  import tkinter as tk
  import sqlite3
  
  
  def connect():
      conn = sqlite3.connect("TRIAL.db")
      cur = conn.cursor()
      cur.execute("CREATE TABLE IF NOT EXISTS profile(id INTEGER PRIMARY KEY, 
  First TEXT, Surname TEXT)")
      conn.commit()
      conn.close()
  
  
  def View():
      conn = sqlite3.connect("TRIAL.db")
      cur = conn.cursor()
      cur.execute("SELECT * FROM profile")
      rows = cur.fetchall()
      for row in rows:
          print(row) # it print all records in the database
      tree.insert("", tk.END, values=row)
      conn.close()
  
  
  connect()  #  this to create the db
  
  root = tk.Tk()
  root.geometry("400x400")
  
  tree= ttk.Treeview(root, column=("column", "colunn1"))
  tree.heading("#0", text="NUMBER")
  tree.heading("#1", text="FIRST NAME")
  tree.heading("#2", text="SURNAME")
  tree.pack()
  
  b2 = tk.Button(text="view data", command=View)
  b2.pack()
  
  root.mainloop()
  </code></pre>