Skip to Content.
Sympa Menu

freetds - Re: tds_login and tds_config

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: tds_login and tds_config
  • Date: Mon, 14 Oct 2002 21:44:54 -0400 (EDT)


Let me explain why things are the way they are currently, and I agree it's
suboptimal.

tds_login is called before a server name has been passed, and can reused
across server connections (even to different servers). Since it is set by
the application program, it takes precedence over config file/environment
settings.

tds_config is loaded once we know the server name, but applied first and
overridden by tds_login. So, if you want to memcpy the tds_login (can't
touch the original, it may be reused) and then apply the config file
settings in an "if not set" manner, it should work correctly.

Brian

On 14 Oct 2002, Frediano Ziglio wrote:

> I started replacing tds_login parameter of tds_connect in tds_config.
> I note that these structure are very similar.
>
> I suggest to remove these two structure and add a tds_connect_info
> structure. tds_config store many information copied from tds_login...
>
> So, client allocate tds_connect_info, fill some info (like servername),
> add information with a tds_read_config_info(TDSCONNECTINFO) (similar to
> get_config_info) and then call tds_connect(TDSSOCKET, TDSCONNECTINFO).
> Odbc instead can fill all info without calling tds_read_config_info,
> doing a freetds.conf'less connection.
>
> Other opinion? (Usually I start coding but I think is time to sleep now
> :) )
>
> freddy77
>
>
>
> ---
> You are currently subscribed to freetds as: [camber AT ais.org]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>





Archive powered by MHonArc 2.6.24.

Top of Page