calling a oracle stored function from vba macro
hi Friends,
i am trying to call a oracle stored function from vba macro.
i have two input parameter and one output parameter. i need display the ouput parameter
Please help me on this. ia m using following connection,
Set objSession = CreateObject("OracleInProcServer.XOraSession")
Set objDataBase = objSession.OpenDatabase(DB, User & "/" & Pwd, 0)
and this is stored function
create or replace
FUNCTION CMCSP_NWST_INSERT(
P_IN_1 NUMBER,
p_in_2 NUMBER
)
RETURN VARCHAR2
AS
PRAGMA AUTONOMOUS_TRANSACTION;
V_FLAG CHAR(10);
BEGIN
INSERT INTO TEST(A,B) VALUES (P_IN_1,P_IN_2 );
V_FLAG := 'SUCCESS';
COMMIT;
RETURN V_FLAG;
END CMCSP_NWST_INSERT;
Thanks in advance
|