how to connect to another user from a named pl/sql block.
dear friends
i really need to connect to another database from a function.
i created this function which receive a username and a password to connect to a schema
create or replace function f_conn(Puser varchar2,Ppassword varchar2)
return boolean
is
vConnString varchar2(10);
begin
select name
into vConnString
from sys.v_$database;
if Puser is not null and Ppassword is not null then
conn puser||'/'||ppassword||'@'||vConnString --<< the error ocuure here
end if;
return true;
exception
when others then
return false;
end;
the follwing error occures :
ORA-06550
PLS-00103
in brief , all i need is how to connect to another user from a named pl/sql block.
Is this possible ??
Please I need an answer
thanks in advance