Re: remembering parameters



Sharif Islam <mislam@xxxxxxxxxxxxx> wrote:
Hi,
I have two queries -- I pass the result of the SELECT query to a stored
procedure. The result from the SELECT query is different during every
pass and I somehow need to remember the old value and pass that to the
store procedure when next time the perl script runs. I would appreciate
some help.

That is an interesting requirement. If the thing to be given to the
prepared statement on execution N is the thing returned by the select
in execution N-1, then what is to be given to the prepared statement
when N==1?

Since you are already using a database, I'd use the database to store
what needs to be stored between executions. That way you have to worry
less about what happens in case of crashes.

But most of all I'd seriously reconsider if this is really the best way
to go about solving whatever it is that I was trying to solve.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
.



Relevant Pages

  • Re: As a generale rule - Query or VBA?
    ... I agree with you Rick, I was recently working on a database that had ... the query is saved, then JET will save the fastest execution path. ...
    (comp.databases.ms-access)
  • Re: Query Help
    ... > objects in any database. ... that parcitular script is executed, I somehow tought that it shouln't put it ... Unless I misunderstand your tables and query, ... I have seen execution plans where the subquery gets ...
    (microsoft.public.sqlserver.programming)
  • Understanding shared lock on database
    ... When I execute a query against another database, ... notice a shared lock being placed on that database. ... even after the query has completed execution and is released only ...
    (comp.databases.informix)
  • Re: bind_param oddity?
    ... explanation is that the database can cache an internal version of the ... query with a execution plan, and can put in placeholder values at ... execution time for constants, but it can't do this for table or column names, ...
    (perl.dbi.users)
  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)