Hi,
I executed the code in Windows environment and it is returning number of
rows with the help of
$sth->rows
or
$rv=$sth->execute;
These two statements are returning number of rows returned without any
problem in Windows Enviroment but in the case of Unix (Sun OS 5.8 we are
using) it is returning number of rows as 0E0 and there are rows in the Table
that is very annoying .
Rajanath
----- Original Message -----
From: "Mark Thornber" <[EMAIL PROTECTED]>
To: "Rajanath Tadikonda" <[EMAIL PROTECTED]>
Cc: "DBI USERS" <[EMAIL PROTECTED]>
Sent: Friday, June 29, 2001 1:24 AM
Subject: Re: Returned value error
> Rajanath,
>
> Look in the fine perldoc for DBI. "0E0" is TRUE and no error but zero
> rows.
>
>
> --MarkT
>
> Rajanath Tadikonda wrote:
> >
> > Hi all ,
> > I am trying to get a returned value in $rv and based on query using
oracle
> > ..
> > This query is returning properly the number of records retr'ved
without
> > any problem
> > but if I try the same code in Unix it is returning "0E0";
> >
> > I will appreciate if any one with similar experiance
> >
> > Thank
> > Rajanath
> > #!/usr/bin/perl
> > use DBI qw(:sql_types);
> >
> > my %dbx=getDetails();
> > my %attr = (PrintError => 0,RaiseError =>0,AutoCommit=>0);
> > my $rv=0;
> > $xctr++;
> >
> > my($usr,$pass,$drv,$connect_string) =
> > ($dbx{DB_USERNAME},$dbx{DB_PASSWD},$dbx{
> >
> > my ($dbh,$status1,$err)=&oraon($usr,$pass,$drv,$connect_string);
> >
> > if(!$status1)
> > {
> > &beta_error_page($err);
> >
> > exit(0);
> > }
> >
> > $dbh->{LongReadLen}=4096*1024;
> >
> > my $sql2="select req_id,user_id,prog_id,file_data,status from
> > fms_contact_impo
> >
> > my $sth=$dbh->prepare($sql2);
> >
> > if(!$sth)
> > {
> > &beta_error_page($DBI::errstr);
> >
> > exit(0);
> > }
> >
> > my $rv=$sth->execute();
> > print " Returned values is $rv \n";
> > exit(0);
>