develooper Front page | perl.dbi.dev | Postings from June 2011

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

Thread Previous | Thread Next
From:
David Nicol
Date:
June 17, 2011 04:11
Subject:
Re: Is it ever legal (should be supported) to issue a non select in selectall_arrayref?
Message ID:
BANLkTi=je8ju5PK5kSM=4G1MbO4HUg9ijQ@mail.gmail.com
Thanks-- the proposed docpatch was a trial balloon to get this answer.
Here's copy for a revised proposed patch:

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 called within an C<eval> block will always work.



On Fri, Jun 17, 2011 at 2:51 AM, Martin J. Evans
<martin.evans@easysoft.com> wrote:
>
> So the proposed change saying
>
> "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."
>
> I don't see how DBD::ODBC is supposed to implement that. fetch is just an
> alias for fetchrow_arrayref. There is fetch and nothing else. If you call
> selectall* it ends up in dbd_st_fetch, if you call fetch it ends up in
> dbd_st_fetch.
>
> So the question becomes which is right DBD::Sybase behaviour or DBD::ODBC.
>
> Martin

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About