Re: PSQLODBC.DLL unhandled exception

Поиск
Список
Период
Сортировка
От 江文
Тема Re: PSQLODBC.DLL unhandled exception
Дата
Msg-id 22584245.1113362796308.JavaMail.postfix@mx37.mail.sohu.com
обсуждение исходный текст
Ответ на PSQLODBC.DLL unhandled exception  ("Szeszler Zsolt" <szeszler@aitia.hu>)
Список 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 по дате отправления:

Предыдущее
От: Nagesh Paladugu
Дата:
Сообщение: ODBC compilation error
Следующее
От: "Jerry Lam"
Дата:
Сообщение: Re: How can I configure the postgresql odbc to return 1 row at a time?