output date parameter in action procedure

Posts   
 
    
kimkim
User
Posts: 19
Joined: 12-Sep-2007
# Posted on: 19-May-2008 15:11:12   

I am using Oracle 10g and LLBLGen 2.5 and want to return a date from an action stored procedure. Since I have to pass in a ref date I do as follows in my code:

DateTime serverDateTime = new DateTime(2008, 1, 1); DateTime quarter = ActionProcedures.GetLastConsolidatedDate(ref serverDateTime);

But when I try to compile the code I get the following error:

'Cannot implicitly convert type int to System.DateTime'.

My stored procedure is as follows:

create or replace PROCEDURE GET_LAST_CONSOLIDATED_DATE ( result OUT DATE ) IS lastMonth Number; lastYear Number; BEGIN

SELECT MAX(YEAR_BLNC) INTO lastYear FROM PRJ_FIFR_HIST_TBL_BLNC WHERE FLG_CONS = 1; SELECT MAX(MONTH_BLNC) INTO lastMonth FROM PRJ_FIFR_HIST_TBL_BLNC WHERE FLG_CONS = 1 AND YEAR_BLNC = lastYear;

IF lastMonth IS NULL OR lastYear IS NULL Then result := NULL; ELSE result := LAST_DAY(TO_DATE(TO_CHAR(NVL(lastMonth, 1), '00') || '/' || TO_CHAR(NVL(lastYear, 1), '0000'), 'MM/YYYY')); END IF;

END GET_LAST_CONSOLIDATED_DATE;

Any ideas?

Thanks.

Kimkim.

kimkim
User
Posts: 19
Joined: 12-Sep-2007
# Posted on: 19-May-2008 17:04:53   

Please ignore this thread, I found my error.