Hi,<br><br>Following is the in-function cursor object.<br><dl class="codebox"><dt>Code:</dt></dl><span style="color: rgb(102, 102, 102);">import pgdb</span><br style="color: rgb(102, 102, 102);">
<br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">
__metaclass__=type</span><br style="color: rgb(102, 102, 102);">
<br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">
class addbook:</span><br style="color: rgb(102, 102, 102);">
<br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">
        conn=pgdb.connect(dsn='localhost:secondbooks',user='postgres',password='postgres1')</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">
        curs=conn.cursor()</span><br style="color: rgb(102, 102, 102);">
<br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">
        def addBook(self):<code><font size="2"><br><br></font></code>                <u>infunction_curs=self.curs</u></span><u><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);"></span></u><code style="color: rgb(102, 102, 102);"><font style="font-family: arial,helvetica,sans-serif;" size="2">                <u>infunction_curs.execute('SELECT * FROM table_book')</u><br>
</font></code><br style="color: rgb(102, 102, 102);"><br>it throws up following error.<br><dl class="codebox"><dt>error: <br></dt><dd><code> <font style="font-family: arial,helvetica,sans-serif;" size="2"><br><span style="color: rgb(102, 102, 102);">File "/usr/lib/python2.5/site-packages/pgdb.py", line 197, in executemany</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);">raise OperationalError, "internal error in '%s': %s" % (sql,err)</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">pg.OperationalError: internal error in 'SELECT * FROM table_book': error return without exception set</span></font><br>
</code></dd></dl><br>Couldn't figure out the reason. Help needed<br><br>Thanks in Advance<br><br>Bijoy<br>