python example5.py
Traceback (most recent call last):
  File "example5.py", line 7, in <module>
    cur.fetchall()
  File "/usr/local/lib/python2.7/dist-packages/firebirdsql/fbcore.py", line 
552, in fetchall
    return list(self._fetch_records)
  File "/usr/local/lib/python2.7/dist-packages/firebirdsql/fbcore.py", line 
497, in _fetch_generator
    stmt_handle, self._xsqlda)
  File "/usr/local/lib/python2.7/dist-packages/firebirdsql/__init__.py", line 
31, in __init__
    DatabaseError.__init__(self, 'InternalError')
TypeError: __init__() takes at least 3 arguments (2 given)
mariuz@borkstationx64:~/work$ cat example5.py
import firebirdsql

con = firebirdsql.connect(dsn='/var/lib/firebird/2.5/data/employee.fdb', 
user='sysdba', password='masterkey')
cur = con.cursor()

cur.execute("select tot from dept_budget(?)", ("100"))
cur.fetchall()
for row in cur:
    print row[0]


Reply via email to