Closed Amrouane closed 4 years ago
Can we have your schema/data and CSDK version? This is what I tried (tblob(c1 int, c2 blob)
informix@irk:/data/informix/IBM/OpenInformix/Py$ python3 t3.py
c1 c2
0 1 None
1 2 None
2 3 None
3 4 None
4 5 b'2020-01-03 15:26:49 17794 18897 Native Insta...
informix@irk:/data/informix/IBM/OpenInformix/Py$
> select * from tblob where c2 is not null;
c1 5
c2 <SBlob Data>
1 row(s) retrieved.
>
And same with a byte column (tbyte(c1 int, c2 byte))
informix@irk:/data/informix/IBM/OpenInformix/Py$ python3 t3.py
c1 c2
0 1 None
1 2 None
2 3 None
3 4 None
4 5 b'2020-01-03 15:26:49 17794 18897 Native Insta...
informix@irk:/data/informix/IBM/OpenInformix/Py$
> select * from tbyte where c2 is not null;
c1 5
c2 <BYTE value>
1 row(s) retrieved.
>
informix@irk:/data/informix/IBM/OpenInformix/Py$ python3 t3.py
c1 c2
0 1 None
1 2 None
2 3 None
3 4 None
4 5 b'defghi'
informix@irk:/data/informix/IBM/OpenInformix/Py$
Testing the IfxPyDbi driver:
informix@irk:/data/informix/IBM/OpenInformix/Py$ cat t4.py
import IfxPyDbi as dbapi2
ConStr = "SERVER=irk1210;DATABASE=stores7;HOST=irk;SERVICE=9088;UID=informix;PWD=ximrofni;"
conn = dbapi2.connect( ConStr, "", "")
cur = conn.cursor()
sql = "SELECT * FROM tblob"
cur.execute(sql)
rows = cur.fetchall()
len(rows)
print ("done ",rows)
informix@irk:/data/informix/IBM/OpenInformix/Py$
informix@irk:/data/informix/IBM/OpenInformix/Py$ python3 t4.py
done [(1, None), (2, None), (3, None), (4, None), (5, b'defghi')]
informix@irk:/data/informix/IBM/OpenInformix/Py$
informix@irk:/data/informix/IBM/OpenInformix/Py$ python3 t4.py
done [(1, None), (2, None), (3, None), (4, None), (5, b'2020-01-03 15:26:49 1.......')]
informix@irk:/data/informix/IBM/OpenInformix/Py$
Both appear to work fine for me.
When I try to retreive my table in informix with ifxpy package, I get this error:
This is my code:
When I print the dataframe I see that I got only the first 4 rows.
I tried also this code and i doesn't trhow any exception but it returns also the first 4 rows of my table:
I tried importing columns one by one, and the same error has occured when I tried to select a byte (blob) column (with text data type). This column has emty values in the first 4 rows but the fifth wasn't empty, and I think this is why the error occured in line 5.
I would really appreciate if anyone has any idea on how to solve this.