Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jdavidb (1361)

jdavidb
  (email not shown publicly)
http://voiceofjohn.blogspot.com/

J. David Blackstone has a Bachelor of Science in Computer Science and Engineering and nine years of experience at a wireless telecommunications company, where he learned Perl and never looked back. J. David has an advantage in that he works really hard, he has a passion for writing good software, and he knows many of the world's best Perl programmers.

Journal of jdavidb (1361)

Monday January 12, 2009
01:50 PM

FreeTDS TDS protocol version

[ #38267 ]

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.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • include TDSPORT and TDSHOST. Using them might help you in that situation.
    • 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