Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Date: May 19 1999 5:22PM
Louis Proyect writes:
> I am using the new version of sql.pl which does not print the value of @res
> after &sql is called. However, if I print @res in sql.pl, it appears okay.
> What's the problem? (I haven't had the time to bone up on Perl 5, but I
> have a feeling that this has nothing to do with which version I am using.)
> use Sybase::DBlib;
> require "sql.pl";
> $dbh = Sybase::DBlib->dblogin("xxx", "yyyy", "zzz");
> &sql($dbh, 'sp_helpdb');
> print @res;
You're printing @res, but you never assign to it.
You probably want:
@res = &sql($dbh, 'sp_help');
That said, you should probably use
instead. The return value is a little different, but you should be
able to use it a lot better.
Michael Peppler -||- Data Migrations Inc.
email@example.com -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: firstname.lastname@example.org