Re: DBD::MSSQL

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Tue, 29 Mar 2011 17:06:20 -0400
<[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.