How to pass a procedure for PRE-COMMIT using OO4O
Hello.
I'm sending over a bunch of Insert statements from Excel straight into Oracle using OO4O.
Normally on the database side, I have before-insert and before-update triggers firing which populate modified_by and modified_date columns for auditing purposes.
In Forms, I would populate a procedure using a Pre-commit trigger which looked like this:
iplot.Pr1('username', SYSDATE,'username', SYSDATE);
And this worked fine.
However in this VBA environment, how do I successfully carry over these parameters into this procedure right BEFORE the commit?
Ive used: 'dmlstr = "execute iplot.Pr1('username', SYSDATE,'username', SYSDATE)"
right before and right after the INSERT statement, but with no success carrying over this info.
I've even tried to to populate the fields using a typical insert statement, but the Before-insert and before-update triggers fire istead with default values.
It has to carry over on the same time as precommit.
Any ideas?
The triggers on each table look like this:
CREATE OR REPLACE TRIGGER IPC_Master_bur BEFORE UPDATE ON
IPC_Master FOR EACH ROW
BEGIN
If P1.modified_by is NULL then
BEGIN
:new.modified_by := USER;
:new.modified_date := SYSDATE;
END;
else
:new.modified_by := P1.modified_by;
:new.modified_date := P1.modified_date;
end if;
END;
Kind Regards,
Edward Apacible
International Flavors & Fragrances
Ph: 732-264-4500 Ext. 3469
Fax: 732-335-2350
Hello.
I'm sending over a bunch of Insert statements from Excel straight into Oracle using OO4O.
Normally on the database side, I have before-insert and before-update triggers firing which populate modified_by and modified_date columns for auditing purposes.
In Forms, I would populate a procedure using a Pre-commit trigger which looked like this:
iplot.Pr1('username', SYSDATE,'username', SYSDATE);
And this worked fine.
However in this VBA environment, how do I successfully carry over these parameters into this procedure right BEFORE the commit?
Ive used: 'dmlstr = "execute iplot.Pr1('username', SYSDATE,'username', SYSDATE)"
right before and right after the INSERT statement, but with no success carrying over this info.
I've even tried to to populate the fields using a typical insert statement, but the Before-insert and before-update triggers fire istead with default values.
It has to carry over on the same time as precommit.
Any ideas?
The triggers on each table look like this:
CREATE OR REPLACE TRIGGER IPC_Master_bur BEFORE UPDATE ON
IPC_Master FOR EACH ROW
BEGIN
If P1.modified_by is NULL then
BEGIN
:new.modified_by := USER;
:new.modified_date := SYSDATE;
END;
else
:new.modified_by := P1.modified_by;
:new.modified_date := P1.modified_date;
end if;
END;
Kind Regards,
Edward Apacible
International Flavors & Fragrances
Ph: 732-264-4500 Ext. 3469
Fax: 732-335-2350