<br>Hi,<br><br>Python throws OperationalError while trying to do any database operations. I am using pgdb module.<br><b><u><br></u></b><dl><dt><u><b>Code:</b></u></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=&#39;localhost:secondbooks&#39;,user=&#39;postgres&#39;,password=&#39;postgres1&#39;)</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(&#39;SELECT * FROM table_book&#39;)<br>
<br><br></u></font></code><b><u>error code:</u></b> <br><br><code><font style="font-family: arial,helvetica,sans-serif;" size="2"><span style="color: rgb(102, 102, 102);">File &quot;/usr/lib/python2.5/site-packages/pgdb.py&quot;, line 197, in executemany</span><br style="color: rgb(102, 102, 102);">

<span style="color: rgb(102, 102, 102);">raise OperationalError, &quot;internal error in &#39;%s&#39;: %s&quot; % (sql,err)</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">pg.OperationalError: internal error in &#39;SELECT * FROM table_book&#39;: error return without exception set</span></font></code><br>
<br>i am not able to do any database operations apart from opening Conection and assaigning cursor object.<br><br>how do i solve this. pls help<br><br>
Thanks in advance<br><font color="#888888"><br>Bijoy</font><br><br>