Jul-18-2018, 12:03 AM
Quote: but when the id doesn't exist, I just get an errorCheck that row[0] has something in it, i.e. a length
row = cursor.fetchone() msg="That ID is not found" if len(row): msg="Owner found", "The ADMIN for this problem ID is: " + row[0]) messagebox.showinfo(msg)Note that the SQL server you are using may return None or an error message when not found, so you would then print row to see which not found error condition you should test for.