date type parameter in Forms 3 with V7
Date: 2 Aug 1994 17:11:21 GMT
Message-ID: <31lunp$djo_at_chaos.dac.neu.edu>
I am experiencing a problem using a date type parameter in a procedure while running Forms 3 against Oracle V7. Below is listed a procedure which evidences the problem.
DEFINE PROCEDURE
NAME = item_exists DEFINITION = <<< procedure item_exists(effectivefrom in date) is rec_cnt number; xeffectivefrom date; begin xeffectivefrom := effectivefrom; select count(*) into rec_cnt from matt /* where effective_from = xeffectivefrom; */ where effective_from = effectivefrom; message('Number of items found == '|| to_char(rec_cnt)); end;
>>>
ENDDEFINE PROCEDURE Assume that a record exists in the table, matt, and that the call to item_exists() "should" find the record. When the select-statement uses the parameter, 'effectivefrom', 'rec_cnt' is zero indicating that no record is found. However, when the local variable, 'xeffective_from' is used in the select-statement, 'rec_cnt' is correctly one. What I do not understand is why the procedure fails when the date type parameter is used, but works when the parameter's value is assigned to a local variable of the same type.
It is worth observing that a message() of a to_char() of the parameter both before and after the select-statement shows the value to be correct.
I am running SQL*Forms 3.0.16.12.8, PL/SQL 2.0.17.1.0, and ORACLE7 Server 7.0.15.4.2 on a DEC Alpha running OSF1 V1.3.
Thank you for your help.
Victor
vimpink_at_lynx.neu.edu
Received on Tue Aug 02 1994 - 19:11:21 CEST