I'm trying to make a GUI with python and tkinter for a firebird database. When I try to write the input from boxes into the databse, I get error
fdb.fbcore.DatabaseError: ('Error while preparing SQL statement:
- SQLCODE: -206
- Dynamic SQL Error
- SQL error code = -206
- Column unknown
- NUMBER
- At line 1, column 99', -206, 335544569)
This is the code for the submit operation:
simnumbber = "SIM NUMBER"
def submit():
# Database connection in the function
conn = fdb.connect(
host='localhost', database='C:/SIMCARDS.fdb', user='user', password='password')
# Cursor
cur = conn.cursor()
# Insert Into table
cur.execute("""INSERT INTO table ("NUMBER", simnumbber, "OPERATOR", "TYPE", "TARIFF", "DATA", "STATUS") VALUES (:number, :simnumber, :operator, :type, :tariff, :data, :status);""",
{
'number': simnumber.get(),
'simnumber': cardnumber.get(),
'operator': operator.get(),
'type': type.get(),
'tariff': tariff.get(),
'data': data.get(),
'status': status.get()
})
# Commit Cahanges
conn.commit()
# Close connection
conn.close()
# Clear Textboxes
simnumber.delete(0, END)
cardnumber.delete(0, END)
operator.delete(0, END)
type.delete(0, END)
tariff.delete(0, END)
data.delete(0, END)
status.delete(0, END)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…