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 MBAY dot NET>
Subject: Re: dbretdata
Date: Mar 25 1998 3:39PM

cardozo@roguewave.com wrote:
> 
> I'm having a hard time making     while (%temp_data = $dbh->dbretdata(1)) {
> Work.
> 
> I'm not quite sure how to set up the exec statements.  Do you have a code sample you could share?
> 
> Thanks!
> 
> Here's the full code of what I'm doing:
> # ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> sub EZSQL_getsprocret {
> # ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


>     &EZSQL_put($dbh, $sql);
>     $dbh->dbresults;

Here you need to call dbnextrow() first, just in case.

>     $count = 0;
>     while (%temp_data = $dbh->dbretdata(1)) {

Don't call dbretdata() in a loop. All the parameters are returned
in one call:

%temp_data = $dbh->dbretdata(1);

Now %temp_data has any/all returned params from the sproc.

Michael
--
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@datamig.com    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com