in reply to Oracle Cursors Exceeded

I'd say that 7000 cursors is a bit much, so its no wonder your running out of them. See a previous post of mine. If you are going to use prepared_cached, then you MUST use placeholders. The variables belong in the execute() argument list, not in the SQL statement itself. See the DBI docs and What are placeholders in DBI, and why would I want to use them?

And especially with a database like Oracle, you should be using placeholders whenever possible whether you use prepare OR prepare_cached.

Replies are listed 'Best First'.
Re (tilly) 2: Oracle Cursors Exceeded
by tilly (Archbishop) on Dec 14, 2001 at 14:01 UTC
    Let's see if we can get a meme going. :-)

    The underlying principle here is Don't Parse (and on the flip side, don't quote). Placeholders are better because they are the solution that doesn't require the SQL's metadata to be correctly generated from parsing your handrolled quoting. Hence you avoid a common source of error.

Re: Re: Oracle Cursors Exceeded
by timo (Novice) on Dec 14, 2001 at 22:24 UTC
    Thank you. I changed the prepare_cached to:
    $sth_back = $db->prepare_cached(" SELECT OID, EDIT_ID FROM AG_EDITORIAL WHERE OID = ? AND EDIT_ID = ? AND OID NOT IN (SELECT OID FROM AG_EDIT_RELD_EDIT WHERE OID NOT IN (SELECT OID FROM AG_EDITORIAL) ) ") or print STDOUT "Query: Checking For Backwards - Part 2 Links Faile +d"; $sth_back->execute($all_rows_r->[0], $all_rows_r->[1]);
    ...and everything worked beautifully!