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
> 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 Peppler -||- Data Migrations Inc.
firstname.lastname@example.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com