PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Version compatibility
Date: Mar 29 2004 5:27PM

On Mon, 2004-03-29 at 08:12, Graham Hick wrote:
> I'm looking into upgrading from ASE 12.0 to ASE 12.5.1, and am trying to figure
> out a few things regarding our installation of Sybperl.  I understand that it was
> built with an "old" version of Sybase Open Client.  I have tried doing:
> 
> ct_config(CS_GET, CS_VERSION,...)
> 
> and this gives an integer value of 112.  Is this the version of OC that Sybperl
> was built with, or that it is running with now?  Either way, what does "112"
> actually mean?

A grep of $SYBASE/$SYBASE_OCS/include/*.h shows the following:

cspublic.h:68:#define CS_VERSION_100		(CS_INT)112
cspublic.h:69:#define CS_VERSION_110		(CS_INT)1100
cspublic.h:70:#define CS_VERSION_125		(CS_INT)12500

which means that the version information is for CS_VERSION_100 (i.e. TDS
capabilities compatible with OpenClient 10.x).

IIRC this is based on the version information that is set when the
Sybase::CTlib and/or DBD::Sybase module is loaded, and that in turn is
mostly defined at build time.

> If anyone can recommend a reliable way of determining both the compile-time
> and run-time version of Open Client I'd be very grateful.

There is no real way of determining the compile-time version of OC that
was used (AFAIK), other than checking with ct_config(CS_VERSION) as you
did (though that won't give you any detailed information).

For run-time information you should do:

ct_config(CS_GET, CS_VER_STRING, $string, CS_CHAR_TYPE);
print "$string\n";

which gives, for me:

Sybase Client-Library/12.5.1 ASE Edition/P-EBF11370/DRV.12.5.1/Linux
Intel/Enterprise Linux Native Threads/BUILD1251-004/OPT/Mon Aug 11
09:59:31 2003

> P.S. Operating System is HP-UX 11, Perl version is 5.004_00x, in case that
> makes a difference!

I would strongly recommend upgrading your perl version to at least 5.6.1

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@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