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: Kym Oberauer <kym at joel dot empire dot com dot au>
Subject: dbnextrow function
Date: Jan 29 1996 12:56AM

Hi,

Here is some sybperl used to down load product id's and their  
descriptions from a table:

sub getProductCodes
	{
        local(%master);
        &dbcmd($dbproc_1, "select * from product_master\n");
        &dbsqlexec($dbproc_1);
        &dbresults($dbproc_1);
   

        while((%master = &dbnextrow($dbproc_1, 1)))
        	{
                $master{"product_id"} =   
&trim_whitespace($master{"product_id"});
                $ProductDescriptionsByCode{$master{"product_id"}} =  
$master{"internal_descri"};
                }
        }

This seems to work fine - however I have noticed that the first row   
from the table is not read in. Is this a problem with the dbnextrow  
function or is there another function I should be using to get the  
first row from the table ?


Thanks in advance,

Kym.