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 mbay dot net>
Subject: ct_describe() and datatypes
Date: Aug 31 1998 4:01PM

Phil Groce writes:
 > 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).
 > 

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

In recent version of sybperl, ct_describe returns TYPE and
SYBTYPE. TYPE is the type that Sybase::CTlib converts the data to when 
in returns it (so DATETIME is usually CS_CHAR_TYPE, unless the
UseDateTime attribute is true).
SYBTYPE is the real Sybase datatype for the corresponding column.

So you should be looking against the SYBTYPE entry instead for the
information that you need.

This might not be documented correctly, by the way...

Michael
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@mbay.net       -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com