开发者

python-sybase how to connect remote server

I host use the "ip:port",but it throws exception:

Sybase.DatabaseError: Layer: 6, Origin: 8 ct_connect(): directory service layer: internal directory control layer error

py-sybase:0.40pre1 sybase-开发者_如何学编程open_client:15

Any idea? Thanks

Ford


>>> import Sybase
>>> help(Sybase.connect)
Help on function connect in module Sybase:

connect(dsn, user, passwd, database=None, strip=0, auto_commit=0, delay_connect=0, locking=1, datetime=None, bulkcopy=0, locale=None, inputmap=None, outputmap=None)

The first argument is a DSN, not a hostname.

So, configure a DSN, test it with isql and use it in your script.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜