Re: PSQLODBC.DLL unhandled exception

From: 江文 <jiangwen365(at)sohu(dot)com>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: PSQLODBC.DLL unhandled exception
Date: 2005-04-13 03:26:36
Message-ID: 22584245.1113362796308.JavaMail.postfix@mx37.mail.sohu.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


Hi,
Just want to claim that I have the similar problem while using ODBC to connect PostgreSQL in Python. Below is the Python script:

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; increase it to 100, that is 'select * from latest_parts limit 100', and Python could almost pass the loop block successfully!

Regards,
Henry

Browse pgsql-odbc by date

  From Date Subject
Next Message Marc Soleda 2005-04-13 09:21:34 VC++/MFC CRecordset problem
Previous Message Kelly Burkhart 2005-04-12 18:46:22 Re: Crystal reports 9 fails to recognise data on upgrade to