Gulafsan Shaheen
Published in : 2022-03-04
I am making a login system by which a user can generate username and password which will be inserted into a database, in the "CreateAccount" table. However when I run the program and try to create a username and password, the program says that the table "CreateAccount" does not exist. How do I fix this?
create = input("Would you like to create an account or re-enter Username?\nEnter 1 to re-enter, Enter 2 to create ") if create == "1": set_up() if create == "2": New_Username = input("Enter a username: ") New_Password = input("Enter a password: ") conn = sqlite3.connect('Database = NEA_quiz_database.db;' 'Trusted_Connection = yes;') cursor = conn.cursor() cursor.execute(""" INSERT INTO CreateAccount (UserID, Password) VALUES(New_Username, New_Password) """) conn.commit()
Join our community and get the chance to solve your code issues & share your opinion with us
Sign up Now
Shilpa Date : 2022-03-05
Best answers
10
Best answers
10
It seems like your database connection is not alive, double-check your database server is up and running, it should work with your code.