Обсуждение: PSQLODBC.DLL unhandled exception
Hi!
I have written an MFC (VC++ 7) application, where I have used a VS7-wizard generated class inherited from CRecordset to access a table in a Postgre db.
I have rarely got an unhandled exception (Access violation) in psqlodbc.dll (version 08.00.0101).
Could someone help me solve my problem?
Thank you in advance,
Szeszko
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