Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: phil_groce at cmcsmart dot com (Phil Groce)
Subject: ct_describe() and datatypes
Date: Aug 31 1998 3:38PM

I'm writing a routine that returns a dataset with some meta-information
from ct_describe() (particularly type information -- I want to sort string,
numeric and datetime data differently).

ct_describe(), of course, returns an array of hash refs that describe each
column -- I'm a little confused on the number returned as the value of the
{TYPE} key in those hash refs.  I'm having some success comparing them to
the CS_xxx_TYPE constants, but it's recognizing datetime fields as chars --
and I'm not so sure my success here isn't a coincidence (esp. since these
constants are mentioned in the Open Client docs, but not explicitly in my
Sybperl docs).  I had also thought they might reference the systypes table,
but couldn't find a compelling correlation there, either.

My questions:
1.  Am I on the right track with CS_xxx_TYPE?  If so, more clarification is
2.  Does sybperl support all the datatypes returned by the Open Client
ct_describe() call?

Any assistance is welcome -- thanks. :)