Skip to Content.
Sympa Menu

freetds - controlling the version in dblib

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Gregg Jensen <greggj AT savvis.net>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: controlling the version in dblib
  • Date: Wed, 11 Nov 1998 10:43:06 -0600


I pulled down the latest from CVS and compared it with code that I am
currently using and noticed a bit of difference with respect to
controlling which version of the protocol is in use (in dblib). What
I have, is that by setting an environment (DBLIB_VERSION) variable
before calling dblogin, you can control which version of the protocol
will be used for the DBPROCESS returned. Thus you can access both
Sybase and MS-SQL server at the same time. The reason for adding it as
an environment variable (note - I have the necessary code changes for
dbsetversion() as well), is that some higher level programs don't
provide a mechanism to change the version level, without modifiying
their source code. For example, with sybperl, it is coded for use only
with Sybase and does not provide a function for allowing the user to
change it, the same with sqsh-1.4. By having the environment variable,
the source code for these to applications do not have to change, and the
user can control it by changing the environment variable. I am in a
situation where there is quite a bit of information that I need from a
Sybase database that is closely related to information on our MS-SQL
database. With this use of the environment variable, I am able to have
one perl script (using sybperl) that goes to one database, gets
infromation and uses it in the query to the other database.

I don't see where adding this code would break anything that currently
exists, and would be an added "feature" (possibly hidden since the
documentation isn't there, and it is not standard for dblib) of the
library. If it shouldn't be added let me know, otherwise I will go
ahead and check in the changes on Friday (time to think about it).

Gregg





Archive powered by MHonArc 2.6.24.

Top of Page