Home » Developer & Programmer » Forms » Executing Query through parameter (Windows XP DB 9i - forms 6i)
Executing Query through parameter [message #362768] Thu, 04 December 2008 01:45 Go to next message
*munnabhai*
Messages: 157
Registered: March 2008
Location: Riyadh
Senior Member
I have a form employee i create two parameter as below

empid and emp_name

im calling another form (civil status) from form employee. on employee block i create one button calling form and passing parameters as below

declareplist ParamList;beginplist := Create_Parameter_List('INPUT_PARAM');Add_Parameter(plist, 'empid',TEXT_PARAMETER,:employee.empid);Add_Parameter(plist, 'emp_name',TEXT_PARAMETER,:employee.emp_name);
CALL_FORM(GETPATH||'CIVIL_STATUS',no_HIDE,NO_REPLACE,NO_QUERY_ONLY,plist);DESTROY_PARAMETER_LIST(plist);
end;
on the calling form i create same parameters as in employee and put the parameter values in when new form instance trigger as below
:EMP_CIVIL_STATUS.EMPID := :PARAMETER.EMPID;
:EMP_CIVIL_STATUS.EMP_NAME := :PARAMETER.EMP_NAME;

i put one more validation trigger on form civil_status.empid when-validate-item for no duplication.

BEGIN
VALIDATE_ITEM(:EMP_CIVIL_STATUS.EMPID,'Employee ID Cannot be NULL');

SELECT EMPID INTO :EMP_CIVIL_STATUS.EMPID
FROM EMP_CIVIL_STATUS
WHERE RTRIM(EMPID)=:EMP_CIVIL_STATUS.EMPID;
ALERT_MESSAGES('Employee ID.'''||:EMP_CIVIL_STATUS.EMPID||''' Already Exist Insert another one...');

EXCEPTION
WHEN NO_DATA_FOUND THEN NULL;
END;

the scenario starts here parameters is working properly, after calling the form civil_status it should check the parameter.empid in form civil_status if the record meets with the same parameter value then execute query and stop processing other wise if record dosent meet with parameter.empid then show the alert and ask user 'Record does not exist create new?' if user say yes then put the same parameters in the empid and emp_name and rest user fill the records. if user say no then exit form without validate how can i do this anyone can help me in this plz...im stuck in this for the last two days.... Sad

Regards
Re: Executing Query through parameter [message #362771 is a reply to message #362768] Thu, 04 December 2008 01:57 Go to previous messageGo to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
I don't think anyone will be excited to help you if he sees your post (at least, i am not), and no one will waste his time trying to understand what you wanted to say.
Please read The Forum Guidelines to learn how to format your post before posting.

Rajy
Re: Executing Query through parameter [message #362773 is a reply to message #362771] Thu, 04 December 2008 02:05 Go to previous messageGo to next message
*munnabhai*
Messages: 157
Registered: March 2008
Location: Riyadh
Senior Member
why dear what happened? anything wrong in my post?
Re: Executing Query through parameter [message #362786 is a reply to message #362768] Thu, 04 December 2008 02:35 Go to previous messageGo to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
YES, it's not formatted in a way anyone can read it easily.
For the second time, please read The Forum Guide, and re-post your FORMATTED code, as it might be. Use the appropriate tags to do that.
In order to have good answers for your questions, please provide a well organized, eazy-to-read post, else, no one will be able to help you.

Rajy
Re: Executing Query through parameter [message #362790 is a reply to message #362786] Thu, 04 December 2008 02:43 Go to previous messageGo to next message
*munnabhai*
Messages: 157
Registered: March 2008
Location: Riyadh
Senior Member
oic i will remember next time....
Re: Executing Query through parameter [message #362791 is a reply to message #362768] Thu, 04 December 2008 02:45 Go to previous messageGo to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
I give up . . .

Rajy
Re: Executing Query through parameter [message #362813 is a reply to message #362791] Thu, 04 December 2008 03:26 Go to previous messageGo to next message
Littlefoot
Messages: 21821
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, I meant to apply [code] tags, but code itself is not formatted (notice "declareplist ParamList;beginplist := <... etc.>").

I believe that the fact that *munnabhai* is a Forum member for almost a year now, was warned (at least) once (we (he and I) have had a discussion just a few days ago) is quite a good sign that he is reluctant to following OraFAQ Forum Guidelines, which - in turn - makes his questions quite a good repellent for my answers.

It really doesn't take much effort - a little bit of formatting, using [code] tags to preserve that formatting and - finally - using punctuation. Wasting time to such questions, while there are many more of them which are much easier to read and understand ... well, one doesn't have to be a genius to decide which ones to pay attention to.
Re: Executing Query through parameter [message #362848 is a reply to message #362768] Thu, 04 December 2008 05:13 Go to previous message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
That's what I meant to say. Personally, I am not ready to search between lines . . .
A membership of about one year is pretty enough to learn the basics of posting threads.
Such OP is the only looser in this case and the only badly affected person since others are not interrested in reading his post, and do not really care if he solves his problems or not.

Rajy
Previous Topic: Comparision between number and varchar2 string
Next Topic: can key-commit re-check the input value?
Goto Forum:
  


Current Time: Mon Nov 04 05:31:51 CST 2024