On Thu, Sep 12, 2002 at 10:12:29PM -0700, Jonathan Leffler wrote:
> Tim Bunce wrote:
> 
> >On Tue, Sep 10, 2002 at 01:49:35PM +0200, Roger Perttu wrote:
> >>Tim Bunce wrote:
> >>>It has to as it's the "standard" way to check. The DBI docs specifically
> >>>say "Non-C<SELECT> statements will have C<NUM_OF_FIELDS == 0>."
> >
> >>The pod is a bit unclear about NUM_OF_FIELDS. I know that it returns 
> >>something > 0 for stored procedures containing select-statements. But I 
> >>know this by testing not by reading the pod.
> >
> >That's very database/driver-specific (Sybase and MSSQL only as far
> >as I know) and the whole issue of how such cases should be handled
> >by the DBI is currently mostly undefined.
> 
> And Informix - if the stored procedure returns values, it is treated as 
> equivalent to a SELECT statement.

Ah yes. That's a different kind of thing but raises the same issue.

> >All add a mention of the issue to the docs. Thanks.
> 
> Done an aeon ago...

I've changed it thus:

    =item C<NUM_OF_FIELDS>  (integer, read-only)
     
    Number of fields (columns) in the data the prepared statement may return.
    Statements that don't return rows of data, like C<UPDATE> and C<DELETE>
    set C<NUM_OF_FIELDS> to 0.

Tim.

Reply via email to