//ORACLE PROCEDURE//
PROCEDURE PRC_PATS_GETPORTVALUES(d_BenchMark IN DATE, d_EndDate IN DATE, s_Portfolios IN VARCHAR2, io_cursor OUT t_cursor)
IS
BEGIN
DECLARE
v_cursor t_cursor;
BEGIN
OPEN v_cursor FOR
-- Get the Security Positions
SELECT AS_OF_DATE, PORTFOLIO, MARKETVALUE, CASH, FUTURESGL, FUTURESCOMM FROM <>;
io_cursor := v_cursor;
END;
END PRC_PATS_GETPORTVALUES;
//ORACLE PACKAGE//
PACKAGE PKG_PATS_GETPORTFOLIOVALUES AS
TYPE t_cursor IS REF CURSOR;
PROCEDURE PRC_PATS_GETPORTVALUES (d_BenchMark IN DATE, d_EndDate IN DATE, s_Portfolios IN VARCHAR2, io_cursor OUT t_cursor);
END PKG_PATS_GETPORTFOLIOVALUES;
//EXCEL VBA CODE//
Set objCmd = New ADODB.Command
objCmd.Parameters.Append objCmd.CreateParameter(Type:=adDate, Direction:=adParamInput, Value:=CDate(strFromDate))
objCmd.Parameters.Append objCmd.CreateParameter(Type:=adDate, Direction:=adParamInput, Value:=CDate(strToDate))
objCmd.Parameters.Append objCmd.CreateParameter(Type:=adVarChar, Direction:=adParamInput, Size:=9, Value:=strPMISAcc)
objCmd.CommandType = adCmdText
objCmd.CommandText = "{CALL PKG_PATS_GETPORTFOLIOVALUES.PRC_PATS_GETPORTVALUES(?,?,?)}"
'Get the Connection Information
Set oConnection = OpenConnection(strConn)
cmd.ActiveConnection = oConnection
'Execute the Stored Procedure
Set rst = New ADODB.Recordset
rst.CursorLocation = adUseClient
rst.CursorType = adOpenDynamic
Set rst = cmd.Execute(lRowsAffected)
-- I am using the following connection string
Provider=OraOLEDB.Oracle;Data Source=;User Id=;Password=
|