denisenkom / pytds

Python DBAPI driver for MSSQL using pure Python TDS (Tabular Data Stream) protocol implementation
MIT License
192 stars 53 forks source link

Add support for TDS 5, Sybase, maybe #69

Closed javjuarez closed 6 years ago

javjuarez commented 7 years ago

I am having a problem by trying to connect to a database url and port, maybe I'm making it wrong, I try the follow

with pytds.connect('132.248.205.170:4101', 'act_firma_tit', '#mypassword') as conn:

and I got this error

pytds.tds.LoginError: ("Cannot connect to server '132.248.205.170:4101': [Errno 11001] getaddrinfo failed", gaierror(11001, 'getaddrinfo failed'))

How can I connect correctly?

javjuarez commented 7 years ago

I made it wrong hehe, now I made this

with pytds.connect(dsn='132.248.205.170', user='act_firma_tit', password='', port=4101, login_timeout=30) as conn:

and I got this error

Empty packet doesn make any sense

denisenkom commented 7 years ago

Looks like the thing you are connecting to does not understand TDS protocol.

knedlsepp commented 6 years ago

I'm having the same problem. In my case the explanation seems to be: "pytds does not currently support TDS version 5.0".

denisenkom commented 6 years ago

What version of SQL server do you have?

knedlsepp commented 6 years ago

It's a "SAP ASE version 16.0 SP02 PL06"

denisenkom commented 6 years ago

this driver works only with MS SQL Server, it is not compatible with Sybase

knedlsepp commented 6 years ago

While I get that the version 5.0 of TDS is unsupported, I think it is not unreasonable to assume that pytds could support Sybase, as this is basically only the legacy version of MS SQL Server. So I'd like to leave this as a feature request. (Knowing that this request might not be fulfilled in the foreseeable future.)

denisenkom commented 6 years ago

I believe Sybase TDS is too different at this point from MSSQL TDS. I think Sybase should be supported by separate driver.