freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] adding named instance support to ctlib
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] adding named instance support to ctlib
- Date: Mon, 2 Oct 2006 08:47:55 +0200
>
> I'm nosing around at what is involved in adding named instance
> support to ctlib. Based on the code in odbc, it looks pretty easy.
>
> What seems the proper interface for it is to add a new property that
> can be set by ct_con_props. So I plan to add CS_INSTANCE_NAME in the
> properties enumeration right after CS_PORT.
>
I would insert CS_INSTANCE_NAME a bit further in order to avoid possible
collisions
> The problem is where to store that data. TDSLOGIN does not have a
> spot for the instance name, but TDSCONNECTION does.
> CS_CONNECTION has
> a TDSLOGIN member. So it looks like one of the following needs to
> happen:
>
> 1. Add an instance_name value to CS_CONNECTION to store the
> property,
> and then copy it over to the TDSCONNECTION in ct_connect.
>
> 2. Add instance_name to TDSLOGIN and move it up in TDSCONNECT so
> first part of the structure that is the same will include
> instance_name.
>
> I'm inclined to do the first since that only modified a private
> structure that really shouldn't be used by anyone.
>
tds.h is private in future release so even TDSLOGIN is private. I would
add a third option. ODBC support a syntax like <server>\<instance> in
SERVER option. In config.c we support <server>:<port> so perhaps
<server>\<instance> in config.c could be useful.
freddy77
- Re: [freetds] adding named instance support to ctlib, ZIGLIO, Frediano, VF-IT, 10/02/2006
Archive powered by MHonArc 2.6.24.