Skip to content
Advertisement

Tag: tkinter

How can i use value of a combobox in another external file to help cursor.excute to search in database? NameError: name ‘combo1’ is not defined

I’m having trouble using the combobox in an external file. Basically the combobox is in the main file and I would like to use its selected value in the external file. If I select a certain item, it should help cursor.excute to search for a database table, so cursor.execute(“SELECT x FROM Table1 WHERE element = ?”, (combo1,)) As you can

Problem in a function that extracts and saves fields from a database table to another

If in the combo_Nations combobox I select a specific Country (the country name is extracted from the “All_Nations” table in the “Nations_name” column), I would like to get the corresponding ID_Nations of the respective selected country (ID_Nations is found in the same table “All_Nations”). The ID will be automatically inserted in another table of the database together with other fields,

TypeError: Argument 2 must be Tuple or List

I have built a GUI using TKinter. There I want to output the stored data and change them individually. Using the UPDATE command, I want to update the data in the table. I use MariaDB as database. I’m getting this error: Here is the complete function: Any suggestions where I’m doing wrong? Answer As the error suggests, the 2nd argument

Updating Multiple Columns in sqlite3

I am wanting to update multiple columns in my ‘Class’ Table in sqlite. I do not know how to do this so I approached the same syntax as an ‘INSERT’ query however, I seem to be having the following syntax error: sqlite3.OperationalError: near “VALUES”: syntax error The line I am currently having issues is I am just wondering how to

How to convert an SQL Output to a python list [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question So basically I have an SQL database with 5 different columns of data. what I am trying to do is take the data from my

Advertisement