wrote:
> I am trying to fetch rows using $sth->fetchrow.
> If I run my sql query from 'sqlplus' prompt, it returns 58 unique
> records. But if I do :
>
> while ($sth->fetchrow())
>
> the loop is terminated after processing only 9 (not 5
records.
>
> Why could this be happening? Is there any variable associated with
> Perl DBI which is set to 9 and fetches only 9 rows by default.
> If the number was 8 or 16, that would be less of a surprise.
> But I am unable to make out while the loop exits too early
> and why it exists after fetching 9 records.
>
> Please advise.
First advice: Please read the posting guidelines and post real code -
a minimal example - that shows the problem.
A DBI statement handle has no fetchrow() method! There are a few that
begin with "fetchrow" though.
And there are no restrictions on the number of returned rows from a
select statement.
Second advice: Please read the docs (perldoc DBI).
When fetching a row of data from a statement handle fails, you can use
the $sth->err() method to check the error. Also have a look at the
trace method of the database handle.
And tell us what perl and DBI version you are running.
Thomas