(no subject)

Pavel <[email protected]>
Newsgroups gmane.comp.python.sybase
Organization Sarkor-Telecom
Message-ID <[email protected]>
Hello

Please look at the following:

>>> import Sybase
>>> db = Sybase.connect('sybase_server', '*', '*', 'xcvb')
>>> c = db.cursor()
>>> c.execute('ERROR_STATEMENT')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/python/lib/python2.3/site-packages/Sybase.py", line 687, in execute
    self.description = fetcher.start(self.arraysize)
  File "/usr/local/python/lib/python2.3/site-packages/Sybase.py", line 442, in start
    return self._start_results()
  File "/usr/local/python/lib/python2.3/site-packages/Sybase.py", line 546, in _start_results
    status, result = self._cmd.ct_results()
  File "/usr/local/python/lib/python2.3/site-packages/Sybase.py", line 161, in _servermsg_cb
    raise DatabaseError(_fmt_server(msg))
Sybase.DatabaseError: Msg 2812, Level 16, State 5, Line 1
Stored procedure 'ERROR_STATEMENT' not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).

>>> c.close()
>>> db.rollback()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/python/lib/python2.3/site-packages/Sybase.py", line 889, in rollback
    self.execute('rollback transaction')
  File "/usr/local/python/lib/python2.3/site-packages/Sybase.py", line 906, in execute
    fetcher.start(self.arraysize)
  File "/usr/local/python/lib/python2.3/site-packages/Sybase.py", line 260, in start
    status = self._cmd.ct_send()
  File "/usr/local/python/lib/python2.3/site-packages/Sybase.py", line 157, in _clientmsg_cb
    raise DatabaseError(_fmt_client(msg))
Sybase.DatabaseError: Layer: 1, Origin: 1
ct_send(): user api layer: external error: This routine cannot be called because another command structure has results pending.
>>>


what am I doing wrong?
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.