Request for change in dblib.c in dbsetlversion

LacaK <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Hi *,
I am playng with "db-lib" as a DB API for my FreePascal project.
I want use dblib.dll to connect to MS SQL Server 7+
So I want to set appropriate TDS protocol version using call to 
"dbsetlversion"
(Yes, I know that I can set TDS protocol version by env.var. TDSVER or 
freetds.conf, but I am looking for way how to set it in program).

So I use dbsetlversion with DBVER60 (becase it accepts only DBVER42 
(which is too old and does not support new features) and DBVER60)
DBVER60 is defined like DBVERSION_70 (and DBVERSION_70 is used when 
TDS70 is defined), but in code is set:
login->tds_login->tds_version=0x600

In this case in log file appears:
...
net.c:225:Connecting to 10.0.0.2 port 1433 (TDS version 6.0)
net.c:281:tds_open_socket: connect(2) returned "WSAEWOULDBLOCK: Resource 
temporarily unavailable."
net.c:321:tds_open_socket() succeeded
util.c:156:Changed query state from DEAD to IDLE
*login.c:575:Unknown protocol version!*
*login.c:462:login packet rejected*
util.c:156:Changed query state from IDLE to DEAD
util.c:331:tdserror(02290500, 02290840, 20002, 0)
dblib.c:7861:dbperror(02290610, 20002, 0)
dblib.c:7913:20002: "Adaptive Server connection failed"
...

So IMHO TDS version 6.0 is bad (http://www.freetds.org/tds.html) and 
should be changed to 7.0 :
(Sybase does not defines dbsetlversion, so only Microsoft is in game 
http://www.freetds.org/userguide/dblib.api.summary.htm)
*login->tds_login->tds_version=0x700*

And/or if possible add also other cases:
    case DBVERSION_71:
        login->tds_login->tds_version = 0x710;
        return SUCCEED;
...

TIA
-Laco.

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
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.