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: John_Erjavec at cargill dot com
Subject: Re: @res?
Date: May 19 1999 7:14PM

     This is because the @res array is an array of arrayrefs.  You'll need 
     to dereference appropriately.  I don't use &sql or DBlib, so I can't 
     give you an exact example.
     
     -JEV
     John Erjavec V
     Cargill, Inc.
     john_erjavec@cargill.com


______________________________ Reply Separator _________________________________
Subject: Re: @res?
Author:  lnp3 (lnp3@columbia.edu) at mtka-unix-mime
Date:    5/19/99 1:41 PM


>That said, you should probably use
>
>       $dbh->sql(...);
>
>instead. The return value is a little different, but you should be 
>able to use it a lot better.
     
The &sql approach worked fine, but when I tried this:
     
==========
#!/usr/local/bin/perl 
use Sybase::DBlib;
$dbh = Sybase::DBlib->dblogin("xxx", "yyy", "zzz"); 
@res = $dbh->sql("sp_helpdb");
print @res;
===========
     
I got this:
     
ARRAY(0x20093590)ARRAY(0x20078588)ARRAY(0x2007b938)ARRAY(0x2007b998)ARRAY(0x 
2007ba40)ARRAY(0x2007baa0)ARRAY(0x2007bb00)ARRAY(0x2007bb60)ARRAY(0x2007bbc0 
)ARRAY(0x2007bc20)ARRAY(0x2007bc80)ARRAY(0x2007bce0)ARRAY(0x2007bd40)
     
???