To set the TDS protocol version when using FreeTDS, without modifying a freetds.conf file, set the TDSVER environment variable.
I previously dealt with an issue that had to be resolved by setting the tds version setting for the connection to 8.0. Using DBD::Sybase, I can bypass the need for a freetds.conf file to specify servers, except that I cannot set tds version from DBD::Sybase. Thus, this issue required me to use a freetds.conf file. Using TDSVER, I can specify everything in my program instead of a semi-global configuration file.
Of course, if I had to connect to two different servers in the same program, say an old Sybase server and a newer MSSQL Server, and both needed me to set different values for tds version, I would likely be up a creek, if neither happened to be the default.
other TDS environment variables (Score:1)
Re: (Score:2)
Thanks. In this specific situation, I can specify those values by the DSN, which permits you to do DBI->connect("dbi:Sybase:host=$host;port=$port"...) . But those could easily be useful in another situation for myself, or anyone else here. :)
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers