Trigger java client update when table changes

I have a Java Swing client and a C worker program. Both need to communicate with each other via events (C writes progress to Oracle table, Java Swing client displays progress to user).
I thought I'd do this via a trigger on an oracle table. However, I couldn't figure out how to achieve that. Well, creating the trigger was the easy part, but how do I let the trigger and as a follow-up a stored procedure communicate with my Java client? All the info I found was about triggers and how to store a Java method in an Oracle DB. That's not what I need. I guess I need to register my Java client somehow to monitor the trigger / table.
Does anyone know how to do that? I'd prefer to not use any additional libraries (Oracle AQ libraries, Oracle streams). A simple trigger would suffice.
Thank you very much for your help!

rp0428 wrote:
>
The client should poll for updates.
Pushing from the database, which your original suggestion and the others provides no benefit in terms of the enterprise and might cause unforseen and difficult to diagnose problems.
>
I don't agree with either of these comments. Please explain them and provide any supporting documentation or other reliabe sources that you are basing these comments on.
In particular clarify whether your comments are about the technology of notification in general or whether you feel that the notification solution is not appropriate for this particular use case.
Polling is generally a terribly wasteful, inefficient and non-productive method of trying to identify changes that happen in a database. Provide supporting documentation for that.
Naturally the actual metrics for this depend on the number, types and frequency of the DB changes in general and with their relation to the polling frequency in particular.Yep. And most of the time the specifics for that is such that one or both the following is true
1. The requirements are wrong (for example no GUI needs to be update 100 times a second.)
2. The requirements are loose enough that polling is perfectly adquate and appropriate solution.
Oracle itself has gone in the opposite direction with the technology that it develops as can be inferred by the various methods provided in recent releases to support replication and the technology underlying the support of fast refresh materialized views.
Oracle has all sorts of stuff in it. That doesn't mean that it ideal for all situations or even most situations.
These technologies include Advanced Queuing, Change Data Capture, Advanced Replication, Standby Databases and the like.
The only major Oracle technology that I am aware of that does not tend towards publish/subscribe is LogMiner and it does not use polling but rather uses a batch query process.
And yet for 20 years people have managed to implement large solutions without that.
Detection of DB changes is difficult for even small single tables without using functionality provided by Oracle specifically for that purpose. There are many, many references in these forums and on the web in general where developers have attempted to 'roll-their-own' procedures for detecting changes after the fact. Most of these attempts are flawed both in their design and execution.
And yet you think that this new technology will provide immediate error free solutions both on Oracles sides and the implementors side?
Polling is generally wasteful and inefficient for several reasons. First, poll queries can execute repeatedly when there haven't been any changes at all. This effort is entirely wasted and non-productive.
I have a large volume database server whose cpu utilization is less than 3% with a projected volume this year of 3/4 billion dollars. In the mid 1980s I was more concerned with utilization. Not so much any more.
On the other hand experience would suggest that developers have far, far more problems getting the database designs right in the first place. So I don't have great confidence in their ability to use brand new technologies to solve large volume problems.
And if they don't have large volumes then the point is moot.
The poll queries cannot easily determine exactly when the change occured; change meaning it was COMMITTED to the database. The common approach of updating columns such as MODIFIED_DATE within a trigger are flawed because any such date/time assigned in the trigger is virtually guaranteed to occur BEFORE the data is actually committed.
The classic flaw manifests itself when the trigger assigns a value before midnight but the commit actually occurs after midnight. Thus two INSERT/UPDATES can have their data COMMITTED at exactly the same SCN and timestamp value but the MODIFIED_DATE values can be for two different days.
There is no way to query this data on a nightly basis to get 'changes that happened today' with the risk of missing data the next night when the extract occurs, or worse, duplicating some data in the extracts for two different nights.
I agree that the design you specified is flawed.
It however is an excellent demonstration of how a developer might create a flawed design - as I a suggested. New technologies do not fix flawed designs. All they do is provide even more ways to create flawed designs. Which is exacerbated by large volume needs.
And 'pushing from the database'? The change notification process is similar to publish/subscribe mechanisms and also similar to the way that listeners are used in Java.
Certainly you wouldn't suggest that Java applications should 'poll' GUI objects to see if a user has taken any action would you?
I agree your analogy is not apt for this discussion.

Similar Messages

  • Om,schdule_ship_date should not be updatable when we change a request_date

    Hi all ,
    can you please help to resolve this issue?
    In OM module Sales order form
    we have request_date and schdule_ship_date and they are some default rules are defined
    as sysdate for both the dates and thses should be effected once you save the form.
    our requirement is schdule_ship_date should not be updatable when we change a request_date
    for the already existing sales order(SO).
    This can be achieved through form personalization.
    Thanks & Regards
    maruthi

    Hi dgood76,
    Becoz there are so many personalizations and dff customizations are done on the form .
    If i remove the dependency is anything is effected .
    Thank & Regards
    maruthi

  • Schdule_ship_date should not be updatable when we change a request_date

    Hi all ,
    can you please help to resolve this issue?
    In OM module Sales order form
    we have request_date and schdule_ship_date and they are some default rules are defined
    as sysdate for both the dates and thses should be effected once you save the form.
    our requirement is schdule_ship_date should not be updatable when we change a request_date
    for the already existing sales order(SO).
    Thanks & Regards
    maruthi

    Duplicate.
    schdule_ship_date should not be updatable when we change a request_date

  • PSD preview doesn't update when i change psd-file

    Hello everyone!)
    I work in Mac OS Mountain Lion. PSD preview doesn't update when i change psd-file placed on external hdd or flash drive (ntfs or exfat).
    Create psd-file.
    Сhanged psd-file in Photoshop cs6 (preview don't update).

    Same problem with PDF files.
    Now it's very difficult to detect latest version of psd-file.
    Does anyone have a similar problem using not HFS file system?

  • Resynchronising form when table changes

    I want to resynchronise my form when table changes, i.e., new column added, datatype changes etc.
    How do I do this? I remember seeing a note on this many months back.

    John,
    As far as I know this is not supported. Changing data types might work fine, but if you add/delete a column to the table
    then you will manually have to edit the form. In some cases might even have to recreate it.
    Thanx,
    Chetan.

  • Time Quotas Updation when EE change from one grp to another group

    Hi Experts,
    Actually I have Two Quotas "A and B " in my Project will be updated based on EE Subgrp on monthly bases
    when EE change EE subgrp in the mid of Month will new quota get generated or not ?
    if Yes, how the process of Quota Updation please let me konw.
    Thanks
    Sreeni

    Hi
    Please make your Question more clear and Try to generate absence Quota through the Tcode pt_qta00 in Test mode and check the result.
    Regards
    Suresh.V

  • Condition value not updated when qty changed

    hi all,
    I have created a new condition ZPR1 (copied from PR00) and use a new formula for it.
    There is a problem when I change the qty after the item is billed.
    Suppose the original qty is 1 and total ZPR1 price is 100. When I change the qty to 2, the ZPR1 price is still 100! It will change to 200 if the item is not billed.
    Anybody encounters such problem and how to solve?
    Thanks

    Hi,
    I don't mean to change the unit price.
    I mean the condition value (the item total price) is not updated
    You can't change the price anymore in the condition tab after you billed
    But when you change the qty of the item, the total value should change accordingly
    And I think for my case I should not cancel the invoice. Suppose original qty is 10, and there is partial shipment of 7 and billed the customer. Later customer request to reduce the qty to 7 to complete the item. We should not cancel the invoice in this case.
    Try to test with PR00 and PN00, you will see the item value will be changed according to the item qty.

  • [Solvd]XFCE mixer panel plugin doesn't get updated when volume changed

    XFCE audio mixer panel plugin used to show the correct volume when I change the volume either with my Laptop touchbuttons or keyboard volume buttons.
    1.  To make sure if I am actually changing the volume, I opened alsamixer and tested pressing keys they work fine.
    2.  I even opened properties option from the indicator and set it to "Master"(the one I use) of my speaker, still no luck.
    3. The only problem is the indicator doesnt update when the volume is changed or muted.
    But for unknow reason this problem started last week.
    Thanks for the help.
    Last edited by vikyboss (2013-06-23 16:27:36)

    vikyboss wrote:
    Actually the problem seems to be resolved. I have a fully updated system and installed xfce again few days ago. And it works miraculously..
    Installed versions:
    1. xfce4-mixer 4.10.0
    2. Advanced Linux Sound Architecture Driver Version k3.9.3-1-ARCH
    ravicious wrote:Oh, I actually fixed this myself yesterday. I installed pulseaudio, pulseaudio-alsa and xfce4-volumed-pulse (from AUR) and then removed volume shortcuts from xfce4-keyboard-settings. In xfce4-mixer, you just have to choose a proper playback as a sound card.
    Wow, actually it now works for me, too! Amazing!

  • Trigger Issue while updating same table

    Hi all,
    I am creating one after insert trigger on table tests, which will check, if application id is null, application will be fetched from another table and update the table
    tests table. But this trigger is not updating the application id of the table tests
    CREATE OR REPLACE
    TRIGGER TB_REC_APPL_TESTS1
    AFTER INSERT ON tests FOR EACH ROW
    DECLARE
    v_application_id NUMBER;
    v_rec_appl_tests_id NUMBER;
    v_a_recruit_id NUMBER;
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    v_rec_appl_tests_id := :NEW.rec_appl_tests_id;
    v_a_recruit_id := :NEW.a_recruit_id;
    IF :NEW.a_applic_id IS NULL THEN
    SELECT a_applic_id INTO v_application_id FROM recruit WHERE a_recrut_id = v_a_recruit_id;
    dbms_output.PUT_LINE(v_application_id||'-'||v_rec_appl_tests_id);
    UPDATE tests SET a_applic_id = v_application_id
    WHERE rec_appl_tests_id = v_rec_appl_tests_id;--:NEW.rec_appl_tests_id;
    END IF;
    commit;
    END;
    Thanks in advance,
    Pal

    user546710 wrote:
    Hi all,
    I am creating one after insert trigger on table tests, which will check, if application id is null, application will be fetched from another table and update the table
    tests table. But this trigger is not updating the application id of the table tests
    CREATE OR REPLACE
    TRIGGER TB_REC_APPL_TESTS1
    AFTER INSERT ON tests FOR EACH ROW
    DECLARE
    v_application_id NUMBER;
    v_rec_appl_tests_id NUMBER;
    v_a_recruit_id NUMBER;
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    v_rec_appl_tests_id := :NEW.rec_appl_tests_id;
    v_a_recruit_id := :NEW.a_recruit_id;
    IF :NEW.a_applic_id IS NULL THEN
    SELECT a_applic_id INTO v_application_id FROM recruit WHERE a_recrut_id = v_a_recruit_id;
    dbms_output.PUT_LINE(v_application_id||'-'||v_rec_appl_tests_id);
    UPDATE tests SET a_applic_id = v_application_id
    WHERE rec_appl_tests_id = v_rec_appl_tests_id;--:NEW.rec_appl_tests_id;
    END IF;
    commit;
    END;
    Thanks in advance,
    Palyou are creating triger on the table and updating it. It will not allow to update since you are firing trigger on same table.
    Best practice is to use other table to update or any other operation.

  • JAVA ERROR MESSAGE WHEN POSTING CHANGES TO OC4J

    We are using Oracle9iAS v1.0.2.2.2a. From the Client we succed in
    posting and commiting changes to our BC4J on the Middletier. The next time we
    postchanges we get the following exeption on the OC4J AS:
    oracle.jbo.DMLException: JBO-26080: Error while selecting entity for Styles
    at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelect(OracleSQLBuilderImpl.java:841)
    at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:3839)
    at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:2630)
    at dk.bestseller.bestinfoII.purchase.stylecard.StylesImpl.lock(StylesImpl.java:635)
    at oracle.jbo.server.EntityImpl.setAttributeValueInternal(EntityImpl.java:1848)
    at oracle.jbo.server.EntityImpl.setAttributeValue(EntityImpl.java:1790)
    at oracle.jbo.server.AttributeDefImpl.set(AttributeDefImpl.java:1570)
    at oracle.jbo.server.EntityImpl.setAttributeInternal(EntityImpl.java:754)
    at dk.bestseller.bestinfoII.purchase.stylecard.StylesImpl.setStyleName(StylesImpl.java:152)
    at dk.bestseller.bestinfoII.purchase.stylecard.StylesImpl.setAttrInvokeAccessor(StylesImpl.java:446)
    at oracle.jbo.server.EntityImpl.setAttribute(EntityImpl.java:680)
    at oracle.jbo.server.ViewRowStorage.setAttributeValue(ViewRowStorage.java:903)
    at oracle.jbo.server.ViewRowStorage.setAttributeInternal(ViewRowStorage.java:819)
    at oracle.jbo.server.ViewRowImpl.setAttributeInternal(ViewRowImpl.java:948)
    at oracle.jbo.server.ViewRowImpl.setAttrInvokeAccessor(ViewRowImpl.java:925)
    at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:717)
    at oracle.jbo.server.remote.RuntimeViewRowSetIteratorInfo.updateRow(RuntimeViewRowSetIteratorInfo.java:311)
    at oracle.jbo.server.remote.RuntimeViewRowSetIteratorInfo.readPiggyback(RuntimeViewRowSetIteratorInfo.java:193)
    at oracle.jbo.server.remote.AbstractRemoteApplicationModuleImpl.readPiggyback(AbstractRemoteApplicationModuleImpl.java:2419)
    at oracle.jbo.server.remote.AbstractRemoteApplicationModuleImpl.isTransactionDirty(AbstractRemoteApplicationModuleImpl.java:1788)
    at oracle.jbo.server.remote.ejb.EJBApplicationModuleImpl.riIsTransactionDirty(EJBApplicationModuleImpl.java:2454)
    at RemoteStylecardModule_StatefulSessionBeanWrapper6.riIsTransactionDirty(RemoteStylecardModule_StatefulSessionBeanWrapper6.java:12889)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01002: fetch out of sequence
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:184)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:241)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1477)
    at oracle.jdbc.ttc7.TTC7Protocol.executeFetch(TTC7Protocol.java:779)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2336)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2462)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:435)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:375)
    at com.evermind.sql.FilterPreparedStatement.executeQuery(FilterPreparedStatement.java:269)
    at com.evermind.sql.FilterPreparedStatement.executeQuery(FilterPreparedStatement.java:269)
    at com.evermind.sql.FilterPreparedStatement.executeQuery(FilterPreparedStatement.java:269)
    at com.evermind.sql.OrclPreparedStatement.executeQuery(OrclPreparedStatement.java:47)
    at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelect(OracleSQLBuilderImpl.java:629)
    at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:3839)
    at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:2630)
    at dk.bestseller.bestinfoII.purchase.stylecard.StylesImpl.lock(StylesImpl.java:635)
    at oracle.jbo.server.EntityImpl.setAttributeValueInternal(EntityImpl.java:1848)
    at oracle.jbo.server.EntityImpl.setAttributeValue(EntityImpl.java:1790)
    at oracle.jbo.server.AttributeDefImpl.set(AttributeDefImpl.java:1570)
    at oracle.jbo.server.EntityImpl.setAttributeInternal(EntityImpl.java:754)
    at dk.bestseller.bestinfoII.purchase.stylecard.StylesImpl.setStyleName(StylesImpl.java:152)
    at dk.bestseller.bestinfoII.purchase.stylecard.StylesImpl.setAttrInvokeAccessor(StylesImpl.java:446)
    at oracle.jbo.server.EntityImpl.setAttribute(EntityImpl.java:680)
    at oracle.jbo.server.ViewRowStorage.setAttributeValue(ViewRowStorage.java:903)
    at oracle.jbo.server.ViewRowStorage.setAttributeInternal(ViewRowStorage.java:819)
    at oracle.jbo.server.ViewRowImpl.setAttributeInternal(ViewRowImpl.java:948)
    at oracle.jbo.server.ViewRowImpl.setAttrInvokeAccessor(ViewRowImpl.java:925)
    at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:717)
    at oracle.jbo.server.remote.RuntimeViewRowSetIteratorInfo.updateRow(RuntimeViewRowSetIteratorInfo.java:311)
    at oracle.jbo.server.remote.RuntimeViewRowSetIteratorInfo.readPiggyback(RuntimeViewRowSetIteratorInfo.java:193)
    at oracle.jbo.server.remote.AbstractRemoteApplicationModuleImpl.readPiggyback(AbstractRemoteApplicationModuleImpl.java:2419)
    at oracle.jbo.server.remote.AbstractRemoteApplicationModuleImpl.isTransactionDirty(AbstractRemoteApplicationModuleImpl.java:1788)
    at oracle.jbo.server.remote.ejb.EJBApplicationModuleImpl.riIsTransactionDirty(EJBApplicationModuleImpl.java:2454)
    at RemoteStylecardModule_StatefulSessionBeanWrapper6.riIsTransactionDirty(RemoteStylecardModule_StatefulSessionBeanWrapper6.java:12889)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    oracle.jbo.DMLException: JBO-26080: Error while selecting entity for Styles
    at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelect(OracleSQLBilderImpl.java:841)
    at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:3839)
    at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:2630)
    at dk.bestseller.bestinfoII.purchase.stylecard.StylesImpl.lock(StylesImpl.java:635)
    at oracle.jbo.server.EntityImpl.setAttributeValueInternal(EntityImpl.java:1848)
    at oracle.jbo.server.EntityImpl.setAttributeValue(EntityImpl.java:1790)
    at oracle.jbo.server.AttributeDefImpl.set(AttributeDefImpl.java:1570)
    at oracle.jbo.server.EntityImpl.setAttributeInternal(EntityImpl.java:754)
    at dk.bestseller.bestinfoII.purchase.stylecard.StylesImpl.setStyleName(StylesImpl.java:152)
    at dk.bestseller.bestinfoII.purchase.stylecard.StylesImpl.setAttrInvokeAccessor(StylesImpl.java:446)
    at oracle.jbo.server.EntityImpl.setAttribute(EntityImpl.java:680)
    at oracle.jbo.server.ViewRowStorage.setAttributeValue(ViewRowStorage.java:903)
    at oracle.jbo.server.ViewRowStorage.setAttributeInternal(ViewRowStorage.java:819)
    at oracle.jbo.server.ViewRowImpl.setAttributeInternal(ViewRowImpl.java:948)
    at oracle.jbo.server.ViewRowImpl.setAttrInvokeAccessor(ViewRowImpl.java:925)
    at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:717)
    at oracle.jbo.server.remote.RuntimeViewRowSetIteratorInfo.updateRow(RuntimeViewRowSetIteratorInfo.java:311)
    at oracle.jbo.server.remote.RuntimeViewRowSetIteratorInfo.readPiggyback(RuntimeViewRowSetIteratorInfo.java:193)
    at oracle.jbo.server.remote.AbstractRemoteApplicationModuleImpl.readPiggyback(AbstractRemoteApplicationModuleImpl.java:2419)
    at oracle.jbo.server.remote.AbstractRemoteApplicationModuleImpl.isTransactionDirty(AbstractRemoteApplicationModuleImpl.java:1788)
    at oracle.jbo.server.remote.ejb.EJBApplicationModuleImpl.riIsTransactionDirty(EJBApplicationModuleImpl.java:2454)
    at RemoteStylecardModule_StatefulSessionBeanWrapper6.riIsTransactionDirty(RemoteStylecardModule_StatefulSessionBeanWrapper6.java:12889)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    We are in the Client part on the application trying to postchanges to OC4J
    aftet a succesfull commit when the exception is thrown.
    //Check if any data changed and postChanges if true
    if (styleCardModule.getTransaction().isDirty()) {
    System.out.println("styleCardModule.getTransaction().postChanges()");
    styleCardModule.getTransaction().postChanges();
    The module works ok if we instead of commiting changes do a rollback.
    Our BC4J are generated with JDeveloper 9i RC2.
    The application (BC4J) works fine when running on JDeveloper 9i RC2.
    Anyone got a solution to this problem?

    Yes. I believe that there is an internal plug-in installed / script programming active that does something which requires Java.
    You could look up the definition of the Structured Application which is used for those XML files to check if a "structure client" is defined.
    But it has nothing to do with FrameMaker as shipped by Adobe.
    - Michael

  • POI Information Updates when Costing Changes are not Saved

    Hi All,
    When you go to the costing screen of a party in Oracle HRMS, make changes to the costing string (Cost Allocation Flexfield) and not save them. Then, exit from the costing form and go to the Purchase Order Information (POI) screen and press Ctrl+F11, the POI information updates to the new changes. It was my understanding that in order for the purchase order info to be updated you need to make changes or "touch" the costing screen and save. I have noticed that the purchase order changes after being in the costing screen even without saving anything. Was this intend?
    Thanks,
    Naveen Gagadam

    The Changes on the Assignment reflect because of the changes on the Costing Screen. This is due to the custom.pll implementation. Is there an event name that I can use for the Assignment form such that the changes on the Assignment screen show up only after the changes are SAVED on the Costing Screen. Here's the code that we are using in the Procedure: Event of the custom.pll
    ====================================================================================
    If Event_name = 'WHEN-VALIDATE-RECORD' then
    --     1. Costing checks at Assignment (PERWSEAC). This code copies first 4 segments of costing string
    --               to Default Expense Account on the Assignment screen.The Code will perform this function for
    -- the first Costing record but no other record.
    if name_in('system.current_form') in ('PERWSEAC') then
         Step_identity := 'Costing to Expense Account Population';
                   if name_in ('system.cursor_block') = 'COST' then
    -- Check if current record is the first record in the block
    -- prior to 4/6/05 this code only ran if first costing record. now runs for all and passes
    -- whether first record to package. B Wagner                    
    if name_in('system.cursor_record') = '1' then
              lvc2_first_rec := 'Y';
    else
         lvc2_first_rec := 'N';
    end if;
                        if name_in('COST.SEGMENT1') is not null
                   and name_in('COST.SEGMENT8') is not null
                   and name_in('COST.SEGMENT2') is not null
                   and name_in('COST.SEGMENT3') is not null then
                             lvc2_company_nm     := name_in('COST.SEGMENT1');
                             lvc2_LOB := name_in('COST.SEGMENT8');
                             lvc2_location := name_in('COST.SEGMENT2');
                             lvc2_dept := name_in('COST.SEGMENT3');
                             FND_PROFILE.get('USER_ID',ln_user_id );
         -- It has been assumed that the seperator for the flexfield segments is a period ('.') .
         -- If the seperator is changed then the following line of code has to be modified.
         -- If the number of segments in the flexfield definition is changed then the number of
         -- separators has also to be modified.
    ln_assignment_id := name_in('COST.ASSIGNMENT_ID');
    ld_session_dt := name_in('CTL_GLOBALS.SESSION_DATE');
    smc_customlib.set_exp_act(
                                                                     ln_retcode,
                                                                     lvc2_errbuf,
                                                                     ln_user_id,
                                                                     ln_assignment_id,
                                                                     ld_session_dt,
                                                                     lvc2_company_nm,
                                                                     lvc2_LOB,
                                                                     lvc2_location,
                                                                     lvc2_dept,
                                                                lvc2_first_rec
    if ln_retcode = -1 then
         -- b wagner 4/6/05 - raise trigger failure so bad combinations can't be entered into costing screen
         fnd_message.set_string(lvc2_errbuf);
         fnd_message.error;
         raise form_trigger_failure;
    end if;
                        end if; -- If costing string is complete
                   end if;   If First Record of COST Block
                   end if; -- If Block is COST
         end if;     -- For Assignment form.
    ================================================================================================================
    Its the custom package that actually populates the changes in Costing Screen onto the Assignment Screen, but I want to activate this only when I save the changes on the Costing Screen. Right now the changes are seen on Assignment Screen when I hit CTRL=F11 even when I don's save the Costing Screen changes.
    Thank You,
    Ngagadam.
    Message was edited by:
    Naveen Gagadam
    Message was edited by:
    Naveen Gagadam
    Message was edited by:
    Naveen Gagadam
    Message was edited by:
    Naveen Gagadam

  • All components not updating when I change the L&F

    I have developed a GUI and want Windows LookAndFeel for it. Please excuse me if I use some terms incorrectly. I'll explain my class structure first -
    1. class MainWindow - Contains the main method and invokes MainFrame
    2. class MainFrame - Creates the basic GUI and all the components and their event-handlers
    3.class MainPanel - Contains the actions to be taken in response to an event in MainFrame
    4. Dialog Boxes : Their are several classes implementing several dialog boxes which I load as needed.
    I have changed the L&F in the MainFrame class after all the MainFrame class components have been loaded. I have also used updateComponentTreeUI( ) to update all components already formed. I found out that not all components are having the Windows L&F when I tried out a JProgressBar. Instead of the green-broken progress indicator (Windows XP style), it was showing the gray-filled indicator (Java style). Then I noticed even the Menu Items are having the default L&F. Can anyone comment. Not giving any code because I am not sure which part of the huge GUI code should I post, i.e. where the problem really lies.

    You just said it doesn't work for a menu. So you
    create a frame with a menu and a menu item. About 10
    lines of code. Then you add two buttons one to switch
    to the Windows LAF the other to the Metal LAF.
    Another 10 lines of code. Now you have your demo
    program.No no, you din't get me. I know the basics regarding L&F. All the components are working fine, but that JProgressBar is not showing the XP view. Forget the JMenuItems, I am not sure the view is Windows L&F or Metal L&F, but I am sure the JProgressBar is not Windows L&F (while the rest of the components in the dialog box are perfect). Could this be due to something that I missed out while implementing the JProgressBar. But the Windows L&F is loaded before the dialog box containing the progress bar comes in. Your answer to my last Swing post helped me a lot. Hope you (or anyone else) can help me with this too

  • TRIGGER to trap UPDATE on Table

    I'm trying to create a TRIGGER that traps the update of a specific column on a specific Table.
    I've pretty much got it working except that it will not extract the
    /EVENT_INSTANCE/TSQLCommand/CommandText)[1]
    For the executed instruction. I've tried both the above instruction and:
    /EVENT_INSTANCE/TSQLCommand)[1]
    Both continue to write NULL to the database.
    How do I get the EVENT to interrogate the TSQLCommand from the EVENT_INSTANCE for a DML trigger?
    The only event data extracted and stored is the EventDate, DatabaseName and the Host. Everything else is NULL.
    Is there a way to extract the data from the EVENT in a DML trigger?
    My full script is below:
    CREATE DATABASE AuditDB;
    GO
    USE AuditDB;
    GO
    CREATE TABLE dbo.DDLEvents
    EventDate DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    EventType NVARCHAR(64),
    EventDDL NVARCHAR(MAX),
    EventXML XML,
    DatabaseName NVARCHAR(255),
    SchemaName NVARCHAR(255),
    ObjectName NVARCHAR(255),
    HostName VARCHAR(64),
    IPAddress VARCHAR(32),
    ProgramName NVARCHAR(255),
    LoginName NVARCHAR(255)
    USE myDB;
    GO
    DROP TRIGGER DDLTriggerName
    GO
    CREATE TRIGGER DDLTriggerName
    ON [dbo].[fmr_FileMoved]
    AFTER
    UPDATE
    AS
    BEGIN
    IF UPDATE(Flag)
    BEGIN
    SET NOCOUNT ON;
    DECLARE @EventData XML;
    SET @EventData = EVENTDATA();
    DECLARE @ip VARCHAR(32);
    SET @ip = (SELECT client_net_address FROM sys.dm_exec_connections WHERE session_id = @@SPID);
    INSERT AuditDB.dbo.DDLEvents
    EventType,
    EventDDL,
    EventXML,
    DatabaseName,
    SchemaName,
    ObjectName,
    HostName,
    IPAddress,
    ProgramName,
    LoginName
    SELECT
    @EventData.value('(/EVENT_INSTANCE/EventType)[1]', 'NVARCHAR(100)'),
    @EventData.value('(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]', 'NVARCHAR(MAX)'),
    @EventData,
    DB_NAME(),
    @EventData.value('(/EVENT_INSTANCE/SchemaName)[1]', 'NVARCHAR(255)'),
    @EventData.value('(/EVENT_INSTANCE/ObjectName)[1]', 'NVARCHAR(255)'),
    HOST_NAME(),
    @ip,
    PROGRAM_NAME(),
    SUSER_SNAME();
    END
    END
    GO

    I've altered things a bit, I've got rid of all the EVENT stuff, as, as long as I've got the ID of the record, then I can do without the rest, and it's sort of working:
    USE AuditDB;
    GO
    DROP TABLE dbo.DDLEvents;
    GO
    CREATE TABLE dbo.DDLEvents
    ID BIGINT IDENTITY(1,1) PRIMARY KEY,
    RecordID BIGINT,
    DatabaseName NVARCHAR(255),
    HostName VARCHAR(64),
    IPAddress VARCHAR(32),
    ProgramName NVARCHAR(255),
    LoginName NVARCHAR(255)
    GO
    USE CMS10DB;
    GO
    DROP TRIGGER DMLUpdate_fmr_FileMover
    GO
    CREATE TRIGGER DMLUpdate_fmr_FileMover
    ON fmr_FileMoved
    AFTER UPDATE, INSERT
    AS
    BEGIN
    IF @@ROWCOUNT = 0
    BEGIN
    -- exit trigger when zero records affected
    RETURN;
    END;
    SET NOCOUNT ON;
    DECLARE @RecID BIGINT;
    SELECT @RecID = inserted.ID FROM inserted INNER JOIN deleted ON inserted.ID = deleted.ID
    -- It's an update if the record is in BOTH inserted AND deleted
    DECLARE @ip VARCHAR(32);
    SET @ip = (SELECT client_net_address FROM sys.dm_exec_connections WHERE session_id = @@SPID);
    INSERT INTO AuditDB.dbo.DDLEvents
    RecordID,
    DatabaseName,
    HostName,
    IPAddress,
    ProgramName,
    LoginName
    SELECT
    @RecID,
    DB_NAME(),
    HOST_NAME(),
    @ip,
    PROGRAM_NAME(),
    SUSER_SNAME();
    END
    GO
    My problem now is, that on the INSERTs the RecID is null. This is supposed to be triggering AFTER the INSERT, so why is the ID not being retrieved and inserted into the Audit record?

  • Why doesn't the local news part of the bbc news website update when content changes?

    i have BBc news as my home page and in Internet Explorer it updates regularly to show changes to local news headlines but this doesn't happen in Firefox. i have to change my location to get the lasetst local headlines. the only person who has enquired about this problem a few months ago seemed not to have resolved it. does anyone have any idea what i can do or should I just go back to using IE?

    This url was not asking for a location: [http://www.bbc.com/news/]
    You can change it to never ask for the location with these steps:
    # Click on the padlock or globe in the url bar
    # Click on "More Information"
    #Click on Permissions
    #Uncheck Use Default under Access Your Location and click "Allow"
    Restart Firefox, when you start it does the news refresh?

  • Desktop does not update when I change networks

    I'm having this odd behavior that I hope someone can shed some light on.
    My desktop is set to keep my icons arranged by name. All of my volumes appear on the desktop, as well. I've noticed in recent weeks that whenever I switch networks, my desktop stops updating. It happens when I unplug my ethernet at work and move to the wireless network, or when I pack up, come home, and connect to my wireless network at home. When I connect to a network volume or plug in my iPod, the icons do not appear on my desktop. Or, if I delete a file from my desktop, it leaves an empty space instead of rearranging the icons like I have it set to do.
    I've found two ways to fix it.
    (1) Relaunch Finder.
    (2) Open the Desktop View Options (Command-J) and adjust the grid spacing.
    Once I do either of these things, all of the icons rearrange appropriately and network volumes I've connected to since switching networks appear. However, on Monday, when I go in to work, I'll have to do one of those two things again.
    Maybe it's just a nuisance, but I worry that behavior like this is a symptom of a larger problem. I can't think of any new software I've installed that might be causing this trouble. I've repaired permissions and deleted caches and all that stuff. Has anyone else experienced this problem?

    Since changing the grid spacing fixes things, I don't think this is a switching network issue. It sounds to me like its a switching screen resolutions issue. I'm guessing that you have your machine plugged into a monitor at one location and not the other, or you have monitors of different sizes/resolutions at both locations. You can test this theory by simply changing your screens resolution once you get your machine into this state. If it fixes the problem, then I was right.
    As far as a permanent fix, I don't think there is one. Only workarounds like you have already discovered.

Maybe you are looking for

  • Facing problem in constructing a sql query

    I want a SQL Query through which I can Select all the values in a column of a table( which is Primary Key and another field in the table refers this field) I want to select all the values of the primary key which are either reffered by a particular v

  • My InDesign keeps crashing and below is the report it gives me

    Can anybody tell me what this means?????? Date/Time:   2014-02-19 13:39:44 -0600 OS Version:  10.8.5 (Build 12F45) Architecture: x86_64 Report Version:  11 Command:     InDesign Path:        /Applications/Adobe InDesign CS6/Adobe InDesign CS6.app/Con

  • Help - how can I remove text in the background?

    I am translating a text from English into Portuguese in a document created in Germany (as .mif 7). After I inserted the Portuguese text, a ruler and the words "498 Entwurf 15.06.2011" in red and "Abstand" in sky blue started to appear in the backgrou

  • Planning Copy Version

    Using version 9.3.1, I am trying to use the Planning functionality File->Workflow-> Copy Version to copy our final budget version to a new version to archive the budget so as to use it for reporting. I have tried several times and each time I try it

  • Does anyone have issues with Windows 7 and Acrobat 8 Pro

    I am using Windows 7 and Acrobat 8 Professional. I have 3 installs that work great but 1 that keeps getting a flashing box the size of a popup and then the entire machine freezes up and requires a reboot to work at all. The flashing box is so fast, I