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: ct_col_name
Date: Apr 12 2002 2:27PM

On Fri, 2002-04-12 at 04:34, Sabherwal, Balvinder (MBS) wrote:
> Guru's
> 
> I am executing a sp from a perl script with ct_sql and after that I make a
> call to get the column names using the ct_col_names. The array is always
> empty. 
> 
> Is that the normal behavior or a bug??

That is normal behavior. ct_col_names() returns the columns of the
current result set, but ct_sql() fetches all the rows of all the result
sets from a query, so when you call ct_col_names() after ct_sql()
returns there is no result set to fetch the names from.

Maybe ct_sql() should fetch the column names for each result set and
store them in the handle?

If so I'd welcome patches as I'm a little busy right now... :-)

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org           *or*          mpeppler@mbay.net
http://www.mbay.net/~mpeppler
International Sybase User Group: http://www.isug.com