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: "Sabherwal, Balvinder (MBS)" <Balvinder dot Sabherwal at mortgagefamily dot com>
Subject: ct_sql Question
Date: Jan 17 2002 7:16PM

I have a script which executes a stored proc on the server and posts the
result back on the web page. I have noticed a stange thing in regards to the
Sequence of the columns in the output on the web page Vs isql. The stored
proc has a select clause as 

"select a,b,c from t1"

If I execute this sp from the isql I see the output as it should be i.e. "a
,b ,c". When I execute the same proc from the perl script and display the
output to the web page the columns are in the order of 
"b, c, a". 

I am using the ct_sql() function to execute the proc as below

my $data = $dbhndl2->ct_sql("exec sp__QMegs", undef, CS_TRUE);

main::(r-chk-q.cgi:89): my $data = $dbhndl2->ct_sql("exec sp__QMegs",
CS_TRUE);
  DB<1>
Can't use string ("1") as a subroutine ref while "strict refs" in use at
C:/Perl/lib/Sybase/CTlib.pm line 910.
Debugged program terminated.  Use q to quit or R to restart,
  use O inhibit_exit to avoid stopping after program termination,
  h q, h R or h O to get additional info.
  DB<1> q

Any idea as how to get the columns in the right sequence??

Thanks
Bal.