0

try: con=cx_Oracle.connect("system/abc123") cursor=con.cursor()

    rno = int( entupRno.get() )
    name = entupName.get()
    marks = int( entupMarks.get() )

    sql = "UPDATE student set name = '%s' and marks = '%d' where rno= '%d' "
    args = (name,marks,rno)
    cursor.execute(sql%args)
    con.commit()
    msg=str(cursor.rowcount) + "rows updated"
    messagebox.showinfo("Success ",msg)

except cx_Oracle.DatabaseError as e:
    con.rollback()
    messagebox.showerror("Failure: ",e)
0

1 Answer 1

1

you should replace and with , in your update statement.

sql = "UPDATE student set name = '%s' , marks = '%d' where rno= '%d' "
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.