for creating a new database
(p1)
| 49 | |
| 50 | |
| 51 | def create_button(p1): |
| 52 | """ |
| 53 | for creating a new database |
| 54 | """ |
| 55 | global cursor |
| 56 | |
| 57 | sql_command = """ |
| 58 | CREATE TABLE notes ( |
| 59 | id INTEGER PRIMARY KEY, |
| 60 | title TEXT, |
| 61 | note TEXT);""" |
| 62 | |
| 63 | try: |
| 64 | cursor.execute(sql_command) |
| 65 | w.errorOutput.configure(text="") |
| 66 | except: |
| 67 | w.errorOutput.configure(text="The database already exists") |
| 68 | |
| 69 | |
| 70 | def add_button(p1): |
nothing calls this directly
no outgoing calls
no test coverage detected