freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
RE: [freetds] [comp.lang.perl.misc] Re: DBD::Sybase, FreeTDS problem
- From: Michael Peppler <mpeppler AT peppler.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] [comp.lang.perl.misc] Re: DBD::Sybase, FreeTDS problem
- Date: Fri, 25 Jun 2004 09:05:42 +0200
On Thu, 2004-06-24 at 21:57, Lowden, James K wrote:
> > From: Michael Peppler
> > Sent: June 24, 2004 2:49 AM
> >
> > FYI - DBD::Sybase 1.03 and later understand host= and port=
> > attributes in
> > the DSN, but this triggers the use of the CS_SERVERADDR connection
> > property, a new feature of OpenClient 12.5.1.
> >
> > If host/port are used and the library doesn't know about
> > CS_SERVERADDR a fatal error is generated.
>
> Thanks, Michael. I suppose we need to document our lack of
> CS_SERVERADDR, at least until it's implemented.
>
> How does DBD::Sybase determine that the underlying ct-lib supports
> CS_SERVERADDR? Is ther some kind of capability/version information
> we're supposed to return, so that you know we're a pre-12.5.1 library?
It checks to see if CS_SERVERADDR is defined.
Hence:
if (imp_dbh->host[0] && imp_dbh->port[0]) {
#if defined(CS_SERVERADDR)
char buff[255];
sprintf(buff, "%.64s %.20s", imp_dbh->host, imp_dbh->port);
if((retcode = ct_con_props(connection, CS_SET, CS_SERVERADDR,
(CS_VOID*)buff,
CS_NULLTERM, (CS_INT*)NULL)) != CS_SUCCEED)
{
warn("ct_con_props(CS_SERVERADDR) failed");
return 0;
}
#else
croak("This version of OpenClient doesn't support CS_SERVERADDR");
#endif
}
which resulted in the error message that the OP got when passing in
host/port information.
Michael
--
Michael Peppler Data Migrations, Inc.
mpeppler AT peppler.org http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short
or long term contract positions - http://www.peppler.org/resume.html
-
[freetds] [comp.lang.perl.misc] Re: DBD::Sybase, FreeTDS problem,
Michael Peppler, 06/24/2004
- <Possible follow-up(s)>
- RE: [freetds] [comp.lang.perl.misc] Re: DBD::Sybase, FreeTDS problem, Berger, Daniel, 06/24/2004
-
RE: [freetds] [comp.lang.perl.misc] Re: DBD::Sybase, FreeTDS problem,
Lowden, James K, 06/24/2004
- RE: [freetds] [comp.lang.perl.misc] Re: DBD::Sybase, FreeTDS problem, Michael Peppler, 06/25/2004
Archive powered by MHonArc 2.6.24.