Re: Cannot Use DBVERSION_72 With DBLIB In 0.91 Release
LacaK <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
Hi *,
I checked this again and for me it PARTIALY works!
If I use *dbsetlversion*(login, DBVERSION_71 or DBVERSION_70) and I have
no freetds.conf (TDS) nor TDSVER set, then
TDS protocol version is set correctly (looking at return value of
*dbtds* or in freetds log file)
But when I use *dbsetlversion*(login, DBVERSION_72) then in freetds log
file appears "TDS version downgraded to 7.1!"
(IMO it happens because of this code in login.c:
/* disable tds9 if iconv wanted, currently not supported */
if (IS_TDS72_PLUS(connection) && tds->use_iconv) {
connection->tds_version = 0x701;
tdserror(tds->tds_ctx, tds, TDSEVERDOWN, 0);
}
)
But it happens always also when I compile without iconv support!
So it seems to me, that error is related to protocol version 7.2 and it
does not matter if it is set using dbsetlversion or TDSVER or freetds.conf.
-Laco.
P.S. it is true, that *dbsetversion* does not accept DBVERSION_72:
so it can be added:
case DBVERSION_70:
- case DBVERSION_80:
+ case DBVERSION_71:
+ case DBVERSION_72:
g_dblib_version = version;
...
(but it seems, that g_dblib_version is not used)
> I do use it and set it, it just has no affect when freetds.conf or TDSVER is not present. I'll just document this on the TinyTDS readme as a workaround.
>
> - Ken
>
> On Sep 8, 2011, at 1:58 AM, LacaK wrote:
>
>
>>> Confirmed, Ken. dbsetversion() should call tds_set_version(). The
>>> code you found was probably a placeholder once upon a time that never
>>> got finished. Most people don't care, you see, because freetds.conf
>>> and TDSVER cover the same territory. (I wonder how many db-lib
>>> programs ever called dbsetversion() or dbsetlversion(). I used
>>> Microsoft's db-lib for over 10 years without setting the version.)
>>>
>>>
>> I use it also.
>> (set default if no freetds.conf or TDSVER is presented)
>>
>> -Laco.
>>
>> _______________________________________________
>> FreeTDS mailing list
>> [email protected]
>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>
>
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
>