On Wed 13 Feb 2002 02:02, Jonathan Leffler <[EMAIL PROTECTED]> wrote: > -The next thing is you really execute the statement. Note that you must > -prepare the attributes NUM_OF_FIELDS, NAME, ... when the statement is > -successfully executed if you have not already done so: They may be used even before >a potential > -I<fetchrow>. In particular you have to tell DBI the number of fields, > -that the statement has, because it will be used by DBI internally. > +The next thing is you really execute the statement. > +Note that you must prepare the attributes NUM_OF_PARAMS, NUM_OF_FIELDS, > +NAME, etc when the statement is successfully executed if the driver has > +not already done so. > +They may be used even before a potential I<fetchrow>. > +In particular you have to tell DBI the number of fields, that the > +statement has, because it will be used by DBI internally.
Maybe mention that these attributes might act different on positional parameters and returned values. For example in the DEC port of DBD-Unify, accessing the NAME field of positional parameters dumps core, where it works fine in the returned values. This is due to the database, not the DBD program. I've tested that with stand-alone code which also fails. (I have no DEC machines anymore, so I cannot test newer releases) Unify might be the odd one out here, but as this is aguideline to new DBD authors (and a reference to existing DBD authors that want to update their drivers to the latest DBI), it might be worth mentioning. -- H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/) using perl-5.6.1, 5.7.1 & 630 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3, WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.022 &/| DBD-Unify ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/
