freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] issue with connecting ms sql azure
- Date: Sat, 1 Oct 2011 10:26:19 -0400
Hi Andy,
On Fri, 30 Sep 2011 16:32:32 -0700
Andy Qian <andyq AT intapp.com> wrote:
> I have modified struct imp_dbh_st in dbdimp.h
> (DBD::Sybase level) by adding one more field there, int directConn,
> and also updated dbdimp.c file correspondingly.
Rather than an int, I suggest "char *dbname". If the dbname appears in
the connection string, you stash it there, else it's NULL and behavior
reverts to the current form: no dbname in the login packet.
> at freetds level, I may need to modify struct CS_CONNECTION
Luckily, no! :-) CS_CONNECTION is a struct _cs_connection, which
contains a TDSLOGIN *tds_login, which has DSTR database. If you set
that before connecting to the server, it will be available to be
included in the login packet.
The function you want to extend appears to be ct_con_props(). You'll
need to add a new enumeration, let's call it "CS_DBNAME", to the
anonymous enum that starts with CS_USERNAME in cspublic.h. Add that to
the switches in ct_con_props() and call tds_set_database_name().
Just eyeballing the code, that looks to be all that's needed. The
libtds login function will include the dbname in the login packet.
HTH.
--jkl
-
Re: [freetds] issue with connecting ms sql azure,
James K. Lowden, 10/01/2011
-
Re: [freetds] issue with connecting ms sql azure,
Andy Qian, 10/03/2011
-
Re: [freetds] issue with connecting ms sql azure,
James K. Lowden, 10/03/2011
- Re: [freetds] issue with connecting ms sql azure, Andy Qian, 10/04/2011
-
Re: [freetds] issue with connecting ms sql azure,
James K. Lowden, 10/03/2011
-
Re: [freetds] issue with connecting ms sql azure,
Andy Qian, 10/03/2011
Archive powered by MHonArc 2.6.24.