Best way to get FreeTDS version?

Marc Abramowitz <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <E5CD626161E81C4DBB58B3E7F649BEA2138D01@DAGN04b-e6.exg6.exghost.com>
I thought it would be nice to have a function in pymssql that prints out the version of FreeTDS in use. This could be useful for troubleshooting as well as skipping tests that are known to fail with older versions of FreeTDS (e.g.: the problem with dbrpcparam with wide strings that I posted about in another thread -- http://lists.ibiblio.org/pipermail/freetds/2013q1/028272.html).

My first attempt was to use the function tds_get_compiletime_settings. That didn't work because that symbol is private in libsybdb. I wonder if it makes sense to make it global?

What I ended up doing was using the ct_config function — unfortunately, this requiring adding a link with libct (pymssql only linked with libsybdb before)

Is there a better way?

Marc
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.