Re: PSQLODBC.DLL unhandled exception - Mailing list pgsql-odbc

From 江文
Subject Re: PSQLODBC.DLL unhandled exception
Date
Msg-id 22584245.1113362796308.JavaMail.postfix@mx37.mail.sohu.com
Whole thread Raw
In response to PSQLODBC.DLL unhandled exception  ("Szeszler Zsolt" <szeszler@aitia.hu>)
List pgsql-odbc
Hi,
    Just want to claim that I have the similar problem while using ODBC to connect PostgreSQL in Python. Below is the
Pythonscript: 

import dbi,odbc
while True:
    print 'connecting Postgres'
    b=odbc.odbc("HScode") # PostgreSQL DSN
    print 'getting postgres cursor'
    bc=b.cursor()
    bc.execute('select * from latest_parts limit 1') #do some operations
    #print bc.fetchall()
    bc.close()
    b.close()

    Run this program on my machine, and Python would crash exactly the fifith loop, after printing out "connecting
Postgres",a dialog box would appear saying something like: Python have referenced a memory address that can not be
read(write?). 
    Also a strangeness is: Increase the number after LIMIT, say 7, and Python could go further, maybe 60 loops;
increaseit to 100, that is 'select * from latest_parts limit 100', and Python could almost pass the loop block
successfully!

    Regards,
    Henry

pgsql-odbc by date:

Previous
From: Nagesh Paladugu
Date:
Subject: ODBC compilation error
Next
From: "Jerry Lam"
Date:
Subject: Re: How can I configure the postgresql odbc to return 1 row at a time?