Re: Is it ever legal (should be supported) to issue a non select in selectall_arrayref?

David Nicol <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
Otherwise,

... and some fetch variant called within an C<eval> block ...



> +=head3 On use of non-C<SELECT> SQL in C<select*_*> methods
> +
> +While some drivers support statements other than C<SELECT> in the above-listed
> +convenience functions, others do not. Requirement of this facility is
> not defined
> +by the DBI interface standard. The C<do> method is provided for non-C<SELECT>
> +statements. When you really don't know if the statement you have in a variable
> +is going to be a C<SELECT> or not, unrolling the process into
> C<prepare>,C<execute>,
> +and some C<fetch> variant will always work, as C<fetch> is defined to return
> +no data when called on executed non-C<SELECT> statement handles.
> +
>  =head3 C<prepare>
>
>    $sth = $dbh->prepare($statement)          or die $dbh->errstr;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.