Re: DBI prepare and fetch



soup_or_power@xxxxxxxxx wrote:
> Many thanks for your replies. I think the reason for prepare is the
> statement handle on return so it can be passed adcross with subroutine
> calls. Passing a statement handle is less memory intensive than passing
> the SQL around. Please correct me if I am wrong.

You are wrong. A statement handle is a fundamental part of the DBI
abtraction, regardless of whether this makes passing them to subroutines
more memory efficient or not. How do you call execute one a statement
handle which does not exist? How do you bind parameters to a statemnet
handle which does not exist? How do you bind columns to a statement handle
that does not exist? How do you avoid excessive soft parses (in Oracle,
and I presume other databases) without statement handles? How do you fetch
rows one at a time without statement handles? (Well, I guess you could
make a result_set handle instead of a statement handle for that last one.)


Xho

--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
.



Relevant Pages

  • Re: Derived type name as a dummy argument - possible?
    ... Dan Nagle wrote: ... but passing a derived type name as a dummy argument does not ... data structures without having to modify the generic subroutine. ...
    (comp.lang.fortran)
  • Re: null terminated strings
    ... a call to those in a subroutine. ... The compiler will then insure that you're passing the proper data type. ... I'm having trouble thinking of the few times that I passed something to a routine, and had the routine treat it as another type of data. ... Passing the address of an AST handler routine when setting up an AST timer routine was interesting. ...
    (comp.os.vms)
  • Re: Does the order of declarations matter?
    ... >> subroutine sub ... >No, these are two different types of arguments - IIRC, one is assumed-size ... passing it as a separate argument. ... an explicit interface is always safer. ...
    (comp.lang.fortran)
  • Difference between passing a number and a variable to a subroutine
    ... I just found out that Fortran distinguishes between passing a variable and actual numbers to a subroutine. ... results in a compiler error: ...
    (comp.lang.fortran)
  • Re: DBI prepare and fetch
    ... I think the reason for prepare is the ... statement handle on return so it can be passed adcross with subroutine ... Passing a statement handle is less memory intensive than passing ...
    (comp.lang.perl.misc)