SQL: Minor change.
parent
87098ff152
commit
f872b625c2
|
|
@ -37,7 +37,6 @@ logger = logging.getLogger()
|
||||||
class CreateTableForSaveAs:
|
class CreateTableForSaveAs:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
self.create_AcousticFile = """
|
self.create_AcousticFile = """
|
||||||
CREATE TABLE AcousticFile(
|
CREATE TABLE AcousticFile(
|
||||||
ID INTEGER PRIMARY KEY AUTOINCREMENT,
|
ID INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
|
|
@ -222,11 +221,7 @@ class CreateTableForSaveAs:
|
||||||
msgBox.exec()
|
msgBox.exec()
|
||||||
|
|
||||||
def create_table(self):
|
def create_table(self):
|
||||||
|
|
||||||
# Create a new database and open a database connection to allow sqlite3 to work with it.
|
|
||||||
cnx = sqlite3.connect(stg.filename_save_as)
|
cnx = sqlite3.connect(stg.filename_save_as)
|
||||||
|
|
||||||
# Create database cursor to execute SQL statements and fetch results from SQL queries.
|
|
||||||
cur = cnx.cursor()
|
cur = cnx.cursor()
|
||||||
|
|
||||||
self.create_table_acoustic_file(cnx, cur)
|
self.create_table_acoustic_file(cnx, cur)
|
||||||
|
|
@ -240,7 +235,6 @@ class CreateTableForSaveAs:
|
||||||
|
|
||||||
cnx.commit()
|
cnx.commit()
|
||||||
|
|
||||||
# Close database
|
|
||||||
cur.close()
|
cur.close()
|
||||||
cnx.close()
|
cnx.close()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue