joec_ has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I have an Oracle cartridge function (see below) that i would like to use bind variables with however the place i need the variable inserting is within single quotes. The function is:

cscartridge.mc(table,'abc','','full=yes')=1

The bind variable would ideally go where the abc string is.

Does anyone have any ideas how i can acheive this?

Thanks.

Joe.

Replies are listed 'Best First'.
Re: DBI Bind Variables and Functions
by jettero (Monsignor) on Nov 10, 2008 at 13:08 UTC

    Maybe I'm missing something...

    $sth = $dbi->prepare("cscartridge.mc(table,?,'','full=yes')=1")

    -Paul

      if i just use the ? on its own, which i know is how its supposed to be done, will the question mark automatically put quotes around the string that is passed in as a bind variable?
        It's passed separately, but you can act as if quotes were put around it, and as if it were escaped properly.
      forgive me, but the code that Paul suggested worked! thanks.