|
From: Valerie R. C. <vr...@co...> - 2003-01-24 15:20:11
|
Hi,
Dave, thanks for your response. We have a big interest in this module
because without it, we have to use a combination of Perl and Python and
it's pretty ugly.
I've dowloaded the version 0.36pre3 and turned on the debugging. I'm
still seeing the same error and it appears that the problem is with
retrieving a text type column. Here is part of the output. The full
output is attatched in the file "output".
ct_describe(cmd1, 9, &fmt) -> CS_SUCCEED, datafmt8=[name:"lengthScale"
type:CS_FLOAT_TYPE status:CS_FALSE format:CS_FMT_UNUSED count:1 maxlength:8]
ct_bind(cmd1, 9, &datafmt8->fmt=[name:"lengthScale" type:CS_FLOAT_TYPE
status:CS_FALSE format:CS_FMT_UNUSED count:32 maxlength:8],
databuf8->buff, databuf8->copied, databuf8->indicator) -> CS_SUCCEED,
databuf8
ct_describe(cmd1, 10, &fmt) -> CS_SUCCEED, datafmt9=[name:"material"
type:CS_TEXT_TYPE status:CS_CANBENULL format:CS_FMT_UNUSED count:1
maxlength:2147483647]
Traceback (most recent call last):
File "DBTest.py", line 10, in ?
db.execute("SELECT * FROM FEMMD_Parameters")
File "/usr/local/pub/dm/lib/python2.1/site-packages/Sybase.py", line
727, in execute
result_list = self._fetch_results()
File "/usr/local/pub/dm/lib/python2.1/site-packages/Sybase.py", line
745, in _fetch_results
bufs = _row_bind(cmd, self.arraysize)
File "/usr/local/pub/dm/lib/python2.1/site-packages/Sybase.py", line
159, in _row_bind
status, buf = cmd.ct_bind(i + 1, fmt)
MemoryError
ct_cmd_drop(cmd1) -> CS_SUCCEED
ct_con_props(conn0, CS_GET, CS_CON_STATUS, &value, CS_UNUSED, NULL) ->
CS_SUCCEED, CS_CONSTAT_CONNECTED
ct_close(conn0, CS_OPT_STATS_IO) -> CS_SUCCEED
ct_con_drop(conn0) -> CS_SUCCEED
There should be two more columns after the "material" column, so it
seems that it does not finish retrieving one row, but stops at the first
text type row.
Knowing this, I've tried a similar query on a table that does not have a
text column and I get a different error. Here is part of the output,
the full output is attached in "output2".
ct_describe(cmd1, 8, &fmt) -> CS_SUCCEED, datafmt7=[name:"energy"
type:CS_FLOAT_TYPE status:CS_FALSE format:CS_FMT_UNUSED count:1
maxlength:8 scale:0 precision:0]
ct_bind(cmd1, 8, &datafmt7->fmt=[name:"energy" type:CS_FLOAT_TYPE
status:CS_FALSE format:CS_FMT_UNUSED count:32 maxlength:8 scale:0
precision:0], databuf7->buff, databuf7->copied, databuf7->indicator) ->
CS_SUCCEED, databuf7
ct_fetch(cmd1, CS_UNUSED, CS_UNUSED, CS_UNUSED, &rows_read) ->
CS_ROW_FAIL, 0
Traceback (most recent call last):
File "DBTest.py", line 10, in ?
db.execute("SELECT * FROM FEMMD_AtomicInfo")
File
"/afs/.msc.cornell.edu/i386_linux22/usr/local/pub/dm/lib/python2.1/site-packages/Sybase.py",
line 732, in execute
result_list = self._fetch_results()
File
"/afs/.msc.cornell.edu/i386_linux22/usr/local/pub/dm/lib/python2.1/site-packages/Sybase.py",
line 751, in _fetch_results
logical_result = self._fetch_logical_result(bufs)
File
"/afs/.msc.cornell.edu/i386_linux22/usr/local/pub/dm/lib/python2.1/site-packages/Sybase.py",
line 760, in _fetch_logical_result
rows = _fetch_rows(cmd, bufs)
File
"/afs/.msc.cornell.edu/i386_linux22/usr/local/pub/dm/lib/python2.1/site-packages/Sybase.py",
line 196, in _fetch_rows
raise Error('ct_fetch')
Sybase.Error: ct_fetch
ct_cmd_drop(cmd1) -> CS_SUCCEED
ct_con_props(conn0, CS_GET, CS_CON_STATUS, &value, CS_UNUSED, NULL) ->
CS_SUCCEED, CS_CONSTAT_CONNECTED
ct_close(conn0, CS_OPT_STATS_IO) -> CS_SUCCEED
ct_con_drop(conn0) -> CS_SUCCEED
Thanks,
Valerie
|