[python-sybase] Sybase.py with MSSQL and BIGINT (8 byte integer)
datatype Supported???
Bradley Feldman
bradley at relevantevidence.com
Tue Aug 30 07:05:28 EST 2005
Does not seem so.... Anyone have any ideas for a quick patch? Right now
I'm typecasting back done to int type (4 byte).
Thanks,
*Bradley
Here's the traceback:
File "/usr/lib/python2.4/site-packages/Sybase.py", line 392, in start
return _FetchNow.start(self, arraysize)
File "/usr/lib/python2.4/site-packages/Sybase.py", line 324, in start
self._row_result()
File "/usr/lib/python2.4/site-packages/Sybase.py", line 345, in
_read_result
while _fetch_rows(self._cmd, bufs, logical_result):
File "/usr/lib/python2.4/site-packages/Sybase.py", line 267, in
_fetch_rows
rows.append(_extract_row(bufs, 0))
File "/usr/lib/python2.4/site-packages/Sybase.py", line 242, in
_extract_row
row[col] = _column_value(buf[n])
TypeError: unknown data format
---
def _column_value(val):
if use_datetime and type(val) is DateTimeType:
return DateTime.DateTime(val.year, val.month + 1, val.day,
val.hour, val.minute,
val.second + val.msecond / 1000.0)
else:
return val
def _extract_row(bufs, n):
'''Extract a row tuple from buffers.
'''
row = [None] * len(bufs)
col = 0
for buf in bufs:
--->>>> row[col] = _column_value(buf[n]) <----- ERROR HERE
col = col + 1
return tuple(row)
More information about the Python-sybase
mailing list