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: John_Erjavec at cargill dot com
Subject: Re: Moving up from Sybperl 4.0 to Sybperl 5.0/web-to-sybas
Date: Nov 16 1998 7:24PM

     This looks like the same error that I was getting when using ct_sql.  
     The problem I was having had to do with the way I was dereferencing 
     my variables.  I don't have the rest of your post anymore, but here 
     is how I was getting at the variables (the right way):
     +++++++++++++++++++CODE CHUNK++++++++++++++++++++++
     $rows = $X->ct_sql("admin who", undef, 1) || die "execute failed!";
     foreach $r (@$rows) {
             if (($$r{'Name'} =~ /^DSI\s*$/) &&
                     ($$r{'Info'} =~ /.+\..+/)) {
                     printf STDOUT "Name: %s -- Info: %s\n",
                       $$r{'Name'}, $$r{'Info'};
     +++++++++++++++++++CODE CHUNK++++++++++++++++++++++
     Like I said before, if there's a better way, let me know. *g*  (I'm 
     thinking of trying this with the ct_execute method instead, and 
     processing it a row at a time, but I'm not sure which would be 
     better, faster, or more readable .)

______________________________ Reply Separator _________________________________
Subject: Re: Moving up from Sybperl 4.0 to Sybperl 5.0/web-to-sybas
Author:  mpeppler ( at mtka-unix-mime
Date:    11/13/98 6:40 PM

Bahri Sofienne writes:
 > i use CTlib to acess a data base, i want to use ct_sql("execute 
 > $Stored_proc....."),
 > i have always this message error:
 > Not a HASH reference at /logiciels/sybperl/lib/site_perl/Sybase/ 
 > line 895.
 > $resultArray = $db->ct_sql( "execute $STORED_PROC $SP_ARGUMENTS", undef, 
 > TRUE );
Try changing the last argument to 1 instead of TRUE. I don't know why 
that would make a difference, but you never know...
Michael Peppler         -||-  Data Migrations Inc.       -||- 
Int. Sybase User Group  -||-
Sybase on Linux mailing list: