Forms :: 10g Win XP 32 Bit - Key-commit Trigger?
Oct 10, 2013
I have a problem with key-commit trigger. I have written some validations and computations criteria on the block level (lines level). Actually there are a number of loops involved in it.
Problem is that the computations are performed twice. (may be the validations would also be performed twice, which couldn't be felt ). Since i read somewhere that key-commit is fired on different events, which i infered to be firing only just before database commit.
View 1 Replies
ADVERTISEMENT
Aug 3, 2013
I am using commit in a trigger as given :
create or replace
trigger comt after insert on tbl_city
declare
pragma autonomous_transaction;
begin
commit;
dbms_output.put_line('Value is committed');
end;
Now when I perform an insert in tbl_city---->trigger fires properly and gives output stream. But If I perform rollback now --->there are the data rollbacked in table.
why?I think after commit(which is in trigger associated at insert to table)there should no any rollback in table.
View 17 Replies
View Related
May 17, 2010
why commit is not allowed in trigger?
View 3 Replies
View Related
Dec 8, 2006
I searched, found this one hit and according to mateoc15, you cannot commit within a procedure that is called from a trigger. He must be right, because mine is not committing either, nor are any errors given.
Trigger
Create or replace trigger owner_name.table1_trg2
after update on table1
for each row
call owner_name.procedure1;
procedure Code (psuedo):
Create or replace procedure1 as
begin
update table1 set col1 = 'whatever';
commit;
exception when others then
rollback;
Executing the procedure as owner_name on SQLPlus works fine, but when I update a column of the table via the PL/SQL package (on the web form), the column does not update, telling me that the procedure never fired from the trigger.
View 5 Replies
View Related
Nov 29, 2007
I am working with an oracle table that is populated by a trigger on another table.. So Table A is an audit of table B. The trigger also uses sysdate to populate a modification Date column on the Audit table.
I was using this modification Date column in a query interface to get changes that happened on the main table after a certain date/time.
The problem is that there is an application that uses transactions to write to table B and sometime this transaction may not be committed for over a minute so the modification Date is not a reliable way to query the table for changes after a certain time.
Is there a way to update the trigger/create a new one where the sysdate that gets written to the audit table is from when the transaction is committed, not when the transaction starts?
View 2 Replies
View Related
Dec 18, 2011
I am calling a child form from a parent form.It works perfectly if the parent form is adding records and while entering records when i press the button to call the child form, the whole things work perfectly according to plan.
The problem begins when i run execute query command in the parent form and then call child form then it does not "commit_form". So this is my problem that child form does not work perfectly when parent form is being called in execute_query procedure.
My working:
1) I read in the documentation that When parent form status is query_only then child will also have the same mode regardless of the parameter given in call_form.So i checked the :SYSTEM.FORM_STATUS of both the parents and child form,it shows "CHANGED" hence this point is covered. (dont know how come the parent form is in changed status but at least it is doing my work)
2) I further read and found that Commit_form procedure make the :SYSTEM.FORM_STATUS as QUERY. Here i am facing problem as in child form when i make changes and press commit form. Then before commit_form and after commit_form the :SYSTEM.FORM_STATUS results in "CHANGED".You can see this in the following code which i have written in save button.
message(:SYSTEM.CURRENT_FORM || ' a ' ||:SYSTEM.FORM_STATUS); pause;
commit_form;
message(:SYSTEM.CURRENT_FORM || ' b ' ||:SYSTEM.FORM_STATUS); pause;
IF Form_Success THEN
Commit;
IF :System.Form_Status <> 'QUERY' THEN
Message('Error prevented Commit');
RAISE Form_Trigger_Failure;
END IF;
else
message('FAIL');
END IF;
exit_form;
then at last exit_form module shows that" i have unsaved data in the form" save Yes-No-Cancel?
View 16 Replies
View Related
Jan 9, 2013
After committing form i want to clear few item and retain few item and make the form ready for next record to be inserted along with retained item.
View 4 Replies
View Related
Aug 25, 2011
Is it possible to clear the form after a successful commit? In order to avoid the user from double posting of record by making double commit.
View 17 Replies
View Related
Mar 15, 2010
I have a master detail form based on two tables and i want to save the record automatically when the user exits the last field.how i can do it.which trigger is appropriate and what is the code.
View 8 Replies
View Related
Jul 3, 2010
i made this loop to commit the same item but depend on the count of suppliers to set the same item every time to different supplier . but the problem this code commit only the first sypplier but not any othere one ..
code : { key - commit - trigger }
declare
var_record_count number ;
VAR_p_request number;
begin
var_record_count:= get_block_property('control',CURRENT_RECORD);
[code]....
View 2 Replies
View Related
Feb 8, 2011
how we can sum data with out commit command in forms
View 3 Replies
View Related
Mar 9, 2011
I'm getting some problem in my project. I've taken my form fields in tabular way. I also have the ID with auto-increment system there. I want that when user moves towards the 2nd row for inserting new record then the 1st record would be committed.
I'm getting my bank-id from database and making +1 increment and made that bank-id text box into display box.
When running my form then it is increasing one like this :
database record
BKID-00001
and with one increment it is showing this in my form display field of 1st row in tabular form.
BKID-00002
but when I moves towards the 2nd row it doesn't commits the form and gives the BANK-ID AS "BKID-00002" again like the above row.
View 25 Replies
View Related
Nov 9, 2010
Restrict field after insertion before commit. i mean when user inputs the data in one field and moves to next field.when ever he want to return back on the previous field it can't be edited.before commit;
View 2 Replies
View Related
Jul 5, 2013
I am just making a audit table as well. i have learnt the basics from here URL.....
My problem is that after inserting into audit table if i issue commit command then the table + unsaved data present on the form is also saved.What i want is that i issue a command which save only inserted record in audit table, and should NOT save data present on the data entry form. (which will be saved later by other method/button).
View 9 Replies
View Related
Mar 17, 2010
I have a four tab canvas. The first 3 tabs belong to one data block. The last tab has two data blocks.
How can I automatically commit changes if the user clicks on any tab and not necessarily in tab order?
View 8 Replies
View Related
Jul 1, 2011
How can "call one trigger of item in trigger of form"
View 5 Replies
View Related
Mar 17, 2010
I have a form reading record information from a flat file and inserting data into a number of varied tables. At the end of file (last line read) the form issues a commit to make all inserts/updates permanent.
There is a record that disappears in particular and this everytime I re-run the test. I mean than in Debug mode, I find it in the right table everytime I query that table until the moment the commit is issued in the code - which is definitely the opposite of what should happen. I understand that for some reason a rollback happens for that record (others are ok after the commit) but my point is that if for some constraint reasons, the record did not qualify, an error should have popped up right from the Insert that added that record, right? Then How comes I find it in the table up until the moment of the commit ?? ...is the deferrable constraint property a clue for digging further?
View 3 Replies
View Related
Feb 17, 2010
How Can We Stop to insert Data if Master Block have the record and detail block have no record but commit command applied i want that commit command can not be work if detail block have no record
View 7 Replies
View Related
Feb 11, 2010
is it possible to change the forms trigger sequence.
for example, i am writing 'when_validate_item' in item level,block level,form level.First item level will fires and then block level and at last form level. But i want to fire the trigger first at form level then block level and at last item level.
View 6 Replies
View Related
Apr 17, 2012
I cann't commit form when new instance form with form status is "NEW".
And then i call:
Text_Item := WebUtil_File.File_Selection_Dialog('', '', 'Excel 2003|*.xls|Excel 2010|*.xlsx|All File|*.*', 'Select a file to Import', Open_File, True);
Form status change to "QUERY"
And then i click button "Import Data" from excel file to Data Block. Now form status change to "CHANGED". But i cannot call "Commit_Form" built-in to insert data to database oracle 10g.
View 9 Replies
View Related
Apr 16, 2010
How do I create a trigger for the age. I want an alert to appear when the date of birth field is less than the age of 17. The formula is age=sysdate-dateofbirth
View 11 Replies
View Related
Jan 2, 2012
I have develop the New Form.Their as a Validate require to Include in it.without saving the Current Record, it not allow to enter the New Record.
Which Trigger Used for this Validate and How to done it.
View 1 Replies
View Related
Aug 16, 2013
I have a multi row form (Order Entry form in E Business Suite). When I enter data in a row and error down the validate-item trigger fires and runs some code to check for duplicates, etc and after the cursor should go down to the next row. It goes back to the original row.
View 4 Replies
View Related
Oct 27, 2013
I have a scenario wherein two columns compute a third one. i.e. quantity and unit_price computes "functional_amount". the column "functional amount" property disabled is set to true but there are a number of validations performed on it. Now when on a certain event "form_trigger_failure" is to be fired. the validation trigger fires multiple times (may be...).
the error alert that i have devised, is shown multiple times along with the message "validation at disabled item "functional amount" failed !". both of these messages follow one after the other unless i close the applet.
View 14 Replies
View Related
Oct 14, 2010
I Created a form just for testing purpose [Which is i attached]
My Table is TEST0
Structure of table :
---------------------------
NOVARCHAR2(5)
NAME VARCHAR2(10)
FLG VARCHAR2(1)
My Task is When i added a record, e.g if on form, i add name - AAD But its must save on TEST0 Table like this way EMPAAD...means always concate with 'EMP'||:Block.name while saving on database..
I know how to do with front end application, but i want to achieve this task by using trigger on backend databse...how to create a Trigger on backend....i try a one trigger but it give me error- Unable to insert Record...
View 12 Replies
View Related
Jul 11, 2011
I am asked to change an existing field (Category_Desc) from a data block (applications) from a current form with a different field (Facility) from another table (Places) that is not used in the current data blocks. How do i do that and how should i populate the data... The common string between the table used in the form (applications) and the non used table (Places) is the ID No.
make this change and also with a possible trigger to generate the data....
View 2 Replies
View Related
Dec 18, 2012
i need to pop up an alert using a trigger to test the data type of a field per example if the input is not a number an alert will popup "Please insert a number"
View 5 Replies
View Related
Nov 17, 2008
In my form, for an item there is code for pre-text-item trigger. In query mode when i go to next record, previous record etc, whether this trigger gets fired? In other forms it is getting executed. Only in this form it is not getting executed. What should be reason for not executing this pre-text-item? Only this item is enabled and cursor is there.
View 9 Replies
View Related
Oct 24, 2012
I'm still trying to import some video in my form.
So far I made one OLE container and add Oracle Video Control, then I made one button and wrote this trigger:
WHEN-BUTTON-PRESSED
declare
video_obj ole2.obj_type;
begin
video_obj := forms_ole.get_interface_pointer
(`MY_VIDEO');ole2.invoke(video_obj,`ImportFileAs');
end;
This works fine. All I want to do now and I don't know why (because I am quite new in Oracle development) is, to make one trigger that will choose automaticly wich video to play and if it is possible to make when I start the form automaticaly to start that video, if not, it's enough just to choose video automaticaly when I press the button.
View 1 Replies
View Related
Aug 22, 2011
i have a text field where i am putting values from an LOV and i want to check for wrong entries like if the user enters a wrong code it should display the message "wrong code".so this is the code i am using in the when validate item trigger:
begin
declare
pc number;
begin
select count(*)
[code]...
But it doesn;t work, it acepts the wrong code also.
View 6 Replies
View Related