Skip to Content.
Sympa Menu

freetds - Re: [freetds] DBD::MSSQL

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] DBD::MSSQL
  • Date: Tue, 29 Mar 2011 23:49:41 -0400

On Tue, 29 Mar 2011 17:06:20 -0400
<eric.berg AT barclayscapital.com> wrote:

> As you may know there are a few things that do not work properly with
> FreeTDS when used against Sybase, so we'd like to have DBI modules
> which use the Sybase and FreeTDS drivers.

I don't mean to discourage you from your plan; Sybase's ct-lib is
better for Sybase's servers than FreeTDS's, certainly. OTOH it's not a
fixable bug unless it's in BUGS. If you'd post a list of ct-lib issues
that you've identified, we could at least keep track.

> What I've been asked to do is to port DBD::Sybase to DBD::FreeTDS.

I don't think that's going to be any fun. at. all.

What you really, really want is two DBD::Sybase modules, one each
compiled and linked with Sybase and FreeTDS libraries. Then you want
to turn a knob in DBI to choose which one to load when you
connect. There is no such knob afaik, although adding one would make
you a hero to the many who have suffered its lack.

One way to solve this without changing DBI is to use DBD::ODBC for the
FreeTDS driver. From a DBI perspective that might be OK, particularly
because the FreeTDS ODBC implementation is more mature and supports
parameterized queries for Microsoft servers. (Some vendor-specific
stuff will leak out, no matter what you do.)

Another way, more similar to what you've been asked to do, would be to
patch DBD::Sybase minimall, just enough so that DBI recognizes it by a
different name e.g. DBD::Ctlib. All the rest of the code would be the
same, facilitating upgrades if you keep your patch handy.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page