Thanks a lot for the reply :)
: : Please help me .. its urgent ...
: :
: : I have two procedures
: :
: : procedure ShowData()
: : begin
: : getData
: : end
: :
: : procedure getDate(isValid out boolean)
: : begin
: : isValid := true
: : end
: :
: : I want to check for the value returned by 'getData' in the 'showData' procedure . How can i do it ? can i do it like this
: : if(getData := true) ...
:
: Stored procedures in Oracle are a lot like C functions, or even VB functions. The difference between "in" and "out" parameters is kind of like the difference between passing values by value vs. by reference.
:
: The way you've defined your procedures, you would have to do this:
:
:
: procedure ShowData is
: blnDateValid boolean;
: begin
: getDate(blnDateValid);
: if blnDateValid then
: ...
: end if;
: end;
:
:
: See, you still have to pass in a parameter even though it is an "out" parameter. The procedure you are calling needs a variable to put that value into.
:
: What you want is something like this:
:
:
: procedure ShowData is
: begin
: if DateIsValid then
: ...
: end if;
: end;
:
: function DateIsValid return boolean is
: begin
: return true;
: end;
:
:
: Also, ":=" is the assignment operator, not the equation test. Just use "=" for testing if two values are equal. If you have a function that returns a boolean value, however, you don't need to have the "= true" test. Just name your functions appropriately and it should be obvious what you mean.
:
:
:
infidel
:
: