[python-sybase] Can't set_property()

skip at pobox.com skip at pobox.com
Fri Sep 23 01:45:33 EST 2005


What am I doing wrong here?

    >>> import Sybase
    >>> conn = Sybase.Connection(...)
    >>> conn.set_property(Sybase.CS_APPNAME, "foo")
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
      File "/opt/lang/python/lib/python2.3/site-packages/3rdParty/Sybase.py",
      line 883, in set_property
        status = conn.ct_con_props(CS_SET, prop, value)
      File "/opt/lang/python/lib/python2.3/site-packages/3rdParty/Sybase.py",
      line 148, in _clientmsg_cb
        raise DatabaseError(_fmt_client(msg))
    Sybase.DatabaseError: Layer: 1, Origin: 1
    ct_con_props(SET,APPNAME): user api layer: external error: This property
    cannot be set after a connection to a server has been established.

I got the same error when trying to set the CS_HOSTNAME property.

This is with 0.36 running on Solaris/Intel connecting to a 12.5 server.

Thx,

-- 
Skip Montanaro
Katrina Benefit Concerts: http://www.musi-cal.com/katrina
skip at pobox.com


More information about the Python-sybase mailing list