Re: msdblib (Re: Troubles upgrading to freetds-0.82)

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
ZIGLIO, Frediano, VF-IT wrote:
> > = Mmmm... yes, try to use version 4.2 to detect protocol 
> > version, however
> > = every time you'll have 2 connections instead of one
> > 
> > Strange -- does not the server identify itself at the initial 
> > "handshake" or 
> > something? Nothing similar to SMTP's "HELO", for example?
> 
> no, initial handshake is quite different for different protocol
> versions...

Cf. http://www.freetds.org/tds.html#login

TDS is an ancient binary protocol; my db-lib manual is copyright January
1988.  Yes, RFC 821 dates from 1982, but Sybase didn't face the
multiple-implementation quandry that Mr. Postel did.  In fact, Microsoft
only recently added a "pre-login" handshake that does approximately that. 
But of course only SQL Server 2008 understands it; it won't help
distinquish a Sybase server from a Microsoft one, or a TDS 7.0 server from
a TDS 8.0 one.  

I did work out a trial-and-error sequence that gets the right protocol
version, but I never finished adding it to the configuration file parser
and to the documentation. It's on my TODO for version 1.0.  

> > And the same application (or a toolkit like Sybtcl) can not 
> > talk to both types 
> > of servers /at once/, unless it is hacked to change a connection's 
> > settings->msdblib itself, which means, it has to be 
> > FreeTDS-aware, rather 
> > than simply use the vendor's API.

Not at all.  Sybase's and Microsoft's implementations of the db-lib API
are *slightly* different.  If you're accustomed to one or the other, you
can specify through --enable-msdblib which one you want.  That option does
*not* affect the kind of server you can connect to.  FreeTDS can connect
to any TDS server, regardless of how compiled.  

HTH.  

--jkl

P.S. Hey, join the list!  I'm a NetBSD guy myself, but I'm more than happy
to help FreeBSD ports to their thing!
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.