[freetds] [comp.lang.perl.misc] Re: DBD::Sybase, FreeTDS problem

Michael Peppler mpeppler at peppler.org
Fri Jun 25 03:05:42 EDT 2004

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.


    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, 
	    warn("ct_con_props(CS_SERVERADDR) failed");
	    return 0;
	croak("This version of OpenClient doesn't support CS_SERVERADDR");

which resulted in the error message that the OP got when passing in
host/port information.

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

More information about the FreeTDS mailing list