I have pysybase 0.38 connecting to a SQL Server database.
There is a table with a blob/image column, say:
table A
a_id int(10) not null primary key;
a_blob image(2147483647) null;
Trying to get the length of the image, I found this works:
select datalength(a_blob) from A where a_id = 12345;
but the following supposedly equivalent SQL will raise a TypeError
select len(convert(varbinary(MAX), a_blob)) from A where a_id = 12345;
The above SQL though works at a SQL prompt...using freetds,
but not with the python-sybase interface.
Digging down in Sybase.py the error is coming from the
_extract_row() function, where it is trying to reference "buf[n]"
In this case:
n = 0
buf = <DataBufType object at 0xb7acd980>
buf.datatype = 30
buf.format = 0
buf[n] = ..... TypeError: unknown data format
Any ideas?
--
Deron Meranda
|