Hi all<br>I have this function:<br>def checkName(self, name):<br>        cur = self.conn.cursor()<br>      <br>        sql = "SELECT * from patient WHERE fn_pat = '" + name + "'"<br>        cur.execute(sql)<br>
        rows = cur.fetchall()<br>        <br>        if rows == "[]":<br>            self.insert()<br><br>It seems to work fine, But I'm getting this exception:<br>psycopg2.ProgrammingError: current transaction is aborted, commands ignored until end of transaction block<br>
at: cur.execute(sql)<br><br>What's the problem?<br>thx<br><br>ps: fn_pat is the column of the db, name is the string passed in the function parameter<br>