[freetds] adding named instance support to ctlib
mark at lilback.com
Fri Sep 29 16:15:05 EDT 2006
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.
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
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.
"The best assumption to have
Mark J. Lilback is that any commonly held
<mark at lilback.com> belief is wrong." -- Ken Olsen,
http://www.lilback.com/ founder, Digital Equip. Corp.
More information about the FreeTDS