connecting to Progress OE with pyodbc

fabio.mei

New Member
I am working with a Progress OpenEdge DB, and I access it from python, with `pyodbc` module.

My problem is about blob fields.

...

f = open('./myFile.pdf', 'r')

value = f.read()

q = '''INSERT INTO "testTab1" (tt_id,tt_desc,tt_blob) VALUES ('1','descrizione01', ?)'''
cu.execute(q, pyodbc.Binary(value))
...

So far, all works fine (I checked 'manually' the inserted record)
...

cu.execute('''SELECT tt_blob FROM "testTab1" WHERE tt_id = '1' ''')

result = cu.fetchall()

print '==>', len(result)
...


result is always None.
If I try to read any other field, no problem.
If I try to read the blob field (or all the fields), result is None.

Please can anyone help me?
Thanks

Fabio
 
Top