------=_Part_8386_19636546.1209855930725
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi all
I have this function:
def checkNameDob(self, name, dob):
cur = self.conn.cursor();
sql = "SELECT * from patient WHERE fn_pat = %s"
cur.execute(sql,(name))
rows = cur.fetchall()
It seems to work fine, But I'm getting this exception:
psycopg2.ProgrammingError: current transaction is aborted, commands
ignored
until end of transaction block
at: cur.execute(sql)
What's the problem?
thx
ps: fn_pat is the column of the db, name is the string passed in the
function parameter.
if I type:
"SELECT * from patient WHERE fn_pat = 'david' "
in the psql on console it works well...
------=_Part_8386_19636546.1209855930725
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi all<br>I have this function:<br> def checkNameDob(self, name,
dob):<br> cur =
self.conn.cursor();<br>
<br> sql = "SELECT * from
patient WHERE fn_pat =
%s"<br>
cur.execute(sql,(name))<br>
rows = cur.fetchall()<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>if I type:<br>"SELECT * from patient WHERE fn_pat =
'david' "<br>
in the psql on console it works well...<br>
------=_Part_8386_19636546.1209855930725--


|