Ciarán_1 0 Newbie Poster

Hello, my code at the minute fetches a record and splits it up into a tuple, this is so each individual element can be displayed in an entry. I am now trying to create a feature which reads what is in the entrybox and updates the record in the database. This is the current code:

 def Update(self):

        global Record
        global Name
        global TrainerID
        global Postcode
        global Age
        global Gender
        global Password

        (Name, TrainerID, Postcode, Age, Gender, Password) = tuple(Record)

        Name = self.ent_Name.get()
        TrainerID = self.ent_TrainerID.get()
        Postcode = self.ent_Postcode.get()
        Age = self.ent_Age.get()
        Gender = self.ent_Gender.get()
        Password = self.ent_Password.get()

        List = [Name, TrainerID, Postcode, Age, Gender, Password]

        self.cur.execute("UPDATE Trainers SET Name=?, TrainerID=?, Postcode=?,Age,=? Gender=?, Password=?",((Name,) (TrainerID,) (Postcode,) (Age,) (Gender,) (Password,)))

When I open the program and try to update the record the following error appears:  

TypeError: 'tuple' object is not callable

Thanks for any help!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.