Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: "Execute Immediate" problem

Re: "Execute Immediate" problem

From: Jeremy <newspostings_at_hazelweb.co.uk>
Date: Mon, 7 Apr 2003 12:30:59 +0100
Message-ID: <MPG.18fb71cb8fe9490e9896ee@news.cis.dfn.de>


In article <b6rmm1$rbj$1_at_sun-cc204.lut.ac.uk>, spam.from.news_at_AdvanticaTech.com says...
> Jeremy,
>
> "Jeremy" <newspostings_at_hazelweb.co.uk> wrote in message
> news:MPG.18fb649be73a77129896ec_at_news.cis.dfn.de...
>
> > And the calling proc is this:
> >
> > declare
> > l_web_site_id number := 61;
> > l_url varchar2(240) := 'http://www.xxx.com';
> > begin
> > execute immediate
> > 'begin
> > zp(p_web_site_id => :l_web_site_id, p_url => :l_url);
> > end;'
> > using l_web_site_id, l_url;
> > end;
>
> > ERROR at line 1:
> > ORA-06536: IN bind variable bound to an OUT positio
> > ORA-06512: at line 22
>
> And the error message is the clue... in the 'using' clause you need to say
> whether the variables are IN, OUT or IN OUT - by default Oracle assumes that
> they're IN. So you need to change your statement to:
>
> USING l_web_site, OUT l_url
>
> I assume that the real code is more complex than the example given as I
> can't see why you *need* to use the EXECUTE IMMEDIATE statement...
>
> Andy
>
>
>

Thanks Andy, that works for me. I obviously need to spend more time rtfming.

This is a test case to ensure I understand and have proven the concepts before implementing into the application. The execute immediate is going to be used to call a stored procedure, the name of which will be determined from a parameter in the system.

-- 

jeremy
RD250A (<insert comment here>)
Received on Mon Apr 07 2003 - 06:30:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US