Yes but there is more to it than that.

>From that really good book, "Programming the Perl DBI"

"As a special case, a row count of zero is returned as the string 0E0, which
is just a fancy mathematical way of saying zero.  Returning 0E0 instead of 0
means that the do() method still returns a value that Perl interprets as
true, even when no rows have been affected."

> From: Aiken, Greg [mailto:[EMAIL PROTECTED]]
>
>
> Have you noticed that when oracle returns;
>
> 0 rows updated
>
> $sth, when printed, prints 0E0?  I assume this is scientific
> notation for 0?
>
>
> > -----Original Message-----
> > From:       Joe Schell [SMTP:[EMAIL PROTECTED]]
> > Sent:       Wednesday, May 03, 2000 12:36 PM
> > To: Perl-Win32-Users Mailing List
> > Subject:    RE: DBI & 'update' - how to determine count of rows updated
> >
> > Perhaps...
> >
> >     perldoc DBI
> >
> > Searching for do() I find
> >
> >       $rows_affected = $dbh->do("update your_table set foo = foo + 1");
> >
> > > Behalf Of Aiken, Greg
> > >
> > >
> > > Interactively, using Oracles 'SqlPlus' after issuing an 'update'
> > > statement,
> > > Oracle replies with;
> > >
> > > X rows updated
> > >
> > > Does anyone know if/how DBI::DBD::Oracle lets you get that
> count of rows
> > > updated?  Any code fragment would be truly appreciated.
> > >
> > > Thanks.
> > >
> > >
> >
> >
> > ---


---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to