Error in ct_options

Marcos Sánchez Provencio <[email protected]>
Newsgroups gmane.comp.python.sybase
Message-ID <1043338177.4845.14.camel@cynar>
Hello there.

I am getting Sybase.Error: ct_options when connecting to MSSQL or
Sybase. If I comment out the CS_OPT_CHAINXACTS line, it seems to work
for simple selects. tsql from freetds, today's version works fine, so I
suppose my freetds.conf file is right. What is the next place to look?


I get the following when connecting to MSSQL2000:

marcos@cynar:~/sybase-0.36pre3$ python -c "import
Sybase;Sybase._ctx.debug = 1;Sybase.connect('cazalla','sa','xxx')"
ct_con_alloc(ctx0, &conn) -> CS_SUCCEED, conn0
ct_con_props(conn0, CS_SET, CS_USERNAME, "sa", CS_NULLTERM, NULL) ->
CS_SUCCEED
ct_con_props(conn0, CS_SET, CS_PASSWORD, "xxx", CS_NULLTERM, NULL) ->
CS_SUCCEED
servermsg_cb
servermsg_cb
ct_connect(conn0, "cazalla", CS_NULLTERM) -> CS_SUCCEED
ct_options(conn0, CS_SET, CS_OPT_CHAINXACTS, 1, CS_UNUSED, NULL) ->
CS_FAIL
ct_cancel(conn0, NULL, CS_CANCEL_ALL) -> CS_SUCCEED
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "Sybase.py", line 768, in connect
    strip, auto_commit, delay_connect, locking)
  File "Sybase.py", line 608, in __init__
    self.connect()
  File "Sybase.py", line 633, in connect
    self._raise_error(Error, 'ct_options')
  File "Sybase.py", line 621, in _raise_error
    raise exc(text)
Sybase.Error: ct_options
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

-- 
Marcos Sánchez Provencio <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.