Re: CURSOR WITH UPDATE



On 7/11/06, Jonathan Leffler <jonathan.leffler@xxxxxxxxx> wrote:

On 7/11/06, pDale <pdalec@xxxxxxxxx> wrote:
> From looking around with Google, it would APPEAR that you can
> implement a cursor WITH UPDATE in DBI, but I have not been able to
> find an example of that. Would anyone happen to have a bare-bones
> code framework for such a thing?

$sth->{CursorName} is a key part of it.

See also the docs for DBD::Informix (http://search.cpan.org/) for an example
- the POD has a section CURSORS FOR UPDATE that shows how to do it.

I should have mentioned I'm working with Oracle. I may have found a
way by working with cursors directly, using something very loosely
related to binding cursors:
<http://search.cpan.org/~pythian/DBD-Oracle-1.17/Oracle.pm#Binding_Cursors>.

Any other suggestions?

--
pDale Campbell
"The moment I let go of it,
Was the moment I got more than I could handle."
.



Relevant Pages

  • Re: CASE for flow control?
    ... You can Google in this group for lots of examples where set-based ... solutions have been given as alternatives to cursors. ... David Portas ... SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: (Fwd) DBIs method for reading [row x,field y]
    ... I am porting an application from Pg to DBI, ... If you are not doing selects with huge result-sets then you can use the selectall_arrayref method which returns all the columns for all the rows in the select into an array reference e.g. ... selectall/fetchall_arrayref retrieves all the rows in the result-set so this will use that amount of memory up but given you are already doing this I guess that won't bother you (unless Pg uses cursors to navigate to the required row). ...
    (perl.dbi.users)