Re: Forms setting Package Vars ?
Date: 1995/11/28
Message-ID: <49fphp$3tm_at_palm.phcs.com>#1/1
In article <49a0eq$bna_at_its.hooked.net>, Craig <caharper_at_hooked.net> writes:
|> I have a forms 4.5 app that has an attached lib, the lib is a
|> package ( body and spec). There are a number of variables on
|> the speck side that get populated with an init package procedure.
|>
|> That works fine.
|>
|> I am trying to update these variables with data generated from
|> the form side. I have tried the following methods with no
|> luck:
|>
|> 1. COPY('block.item','package_name.variable'); -- no update
|> 2. package_name.variable := :item; -- no update
|>
|> 3. CREATED PROCEDURE TO UPDATE VARIABLE AS FOLLOWS:
|> set_pack_variable(var IN varchar2);
|>
|> Pasckage Body
|> set_pack_variable(var IN VARCHAR2) IS -- no update
|> BEGIN
|> pack_var := var;
|> END;
I don't think anyone else has answered this yet....
(1) won't work because COPY only knows about form fields and variables
(e.g. :GLOBAL.<var> and :SYSTEM.MESSAGE_LEVEL)
(2) won't work because of a bug in the handling of public variables
in packages. It ought to work, but currently doesn't.
(3) should work, and looks like a workaround I've used before. What
does your notation "no update" mean? Do you get an error message? When/how are you evaluating PACK_VAR after the call to SET_PACK_VARIABLE ? Are you keeping in mind that each Oracle session has its own value of PACK_VAR ? I.e., your Forms session could set PACK_VAR to 'abc', but a different Forms session, or a SQL*Plus session, etc., could have PACK_VAR = 'def'.
I'm also confused about your "attached lib" being a package. Are you doing something other than defining your package in the database? Received on Tue Nov 28 1995 - 00:00:00 CET