Updating row after insert that causes trigger

Hi,
I have a table which one of the columns is a sequence number which each time a new row is written I want to automatically write to this sequence column the latest number (which is maintained using an Oracle sequence). I decided to use a trigger which works great:
CREATE OR REPLACE TRIGGER pre_insert_trg before insert ON INCOMING
for each row
BEGIN
SELECT INCOMING_SEQ.NEXTVAL
INTO :new.SEQ
FROM DUAL;
END;
The problem is I have many multi-threaded processes writing to this table and the sequence number gets allocated before the row is committed which means although thread 1 may write first it may commit after thread 2 which has a later sequence number which has the result that sequence number 2 may be shown before 1. The problem is much larger when dealing with many threads with 100's of messages a second and so I would prefer the seq to be added AFTER the insert (once committed), e.g.
CREATE OR REPLACE TRIGGER post_insert_trg after insert ON INCOMING
for each row
BEGIN
SELECT INCOMING_SEQ.NEXTVAL
INTO :new.SEQ
FROM DUAL;
END;
Trying to create this trigger results in a "ORA-04084: cannot change NEW values for this trigger type". Is there a way to update a column for the row which caused the trigger? If I try and remove the :new. I then get errors when inserting about mutating table (which I understand the DML locking but need a way round)
Many thanks,
John

Off hand I think the only way you can do what you say you want to do is to replace the sequence with a code table. A transaction locks the code table, gets the next value from it and unlocks the code table at the end of the transaction. This ensures that the sequence number is always assigned in transaction completion order (or rather the transactions always complete in sequence assigned order). It is basically what java does with its synchronize statement.
The only drawback with this approach is that it completely shags the performance of the sort of multi-threaded environment you've just described. :P
So you need to decide what's more important: having stuff inserted into a queue in sequence order or having a multi-threaded system running quickly. I really don't see how you can acheive what you're attempting in a genuinely concurrent environment; you'll have to introduce an artificial serialism (ie bottleneck) somewhere.
If you do crack this please tell me how: I would be interested in ordering multiple AQs in the fashion you described.
Cheers, APC

Similar Messages

  • Updating statistics after insert

    Is it possible, without creating a custom post-map process, to update statistics after inserting rows into a table. I've tried setting different parameters within OWB to no avail.
    Please respond only if you have actually succeeded in updating statistics without writing code. I've already read the docs and experimented.
    Thanks.
    Garrett

    Hi,
    why do you think so? The analyze configuration
    results in a procedure which calls
    WB_RT_MAPAUDIT_UTIL_INVOKER for each target table
    which then calls the DBMS_STATS-Package? What is
    misssing for the CBO? I'm a little bit confused?!
    Regards,
    DetlefThanks for the info. I'm a little confused. I thought that I had the analyze table box checked in the configuration and statistics were not updated. However, when I looked again, it was not checked. My error. Ran another test and statistics were updated. Sorry for the confusion.
    G.

  • How to count updated rows after an UPDATE?

    Is there a way to count updated rows after an update?
    Let's say I have an update like
    UPDATE table_a
    set field_1 = 'new_field'
    WHERE field_2 ='some_value' ;
    And now I would like to insert an info record into logging table like
    INSERT INTO logging_tbl (step, description, changed_rows) VALUES('UPDATE', 'update of table_a', ?);
    update is in sqlplus script.
    Thanks.
    Message was edited by:
    br00klynZ00

    Use SQL%ROWCOUNT.
    DECLARE
      v_num NUMBER := 0;
    BEGIN
    UPDATE table_a
    set field_1 = 'new_field'
    WHERE field_2 ='some_value' ;
    v_num := SQL%ROWCOUNT;
    INSERT INTO logging_tbl (step, description, changed_rows)
    VALUES('UPDATE', 'update of table_a', v_num);
    END;

  • Update by after insert trigger

    I need to update each new inserted row of data by checking if there were same values in the table. So I tried the After Insert Trigger with the code below :
    CREATE OR REPLACE TRIGGER approve_checker
    after insert on TBL_BILL
    for each row
    declare
    counter integer;
    begin
    SELECT COUNT() INTO counter FROM TBL_BILL WHERE issue_date=:NEW.issue_date AND wagon_no=:NEW.wagon_no ;*
    IF( counter > 1)
    THEN
    UPDATE TBL_BILL SET approved = 2 WHERE id = :NEW.id;
    END IF;
    end approve_checker;
    But errors accured :
    ORA-04091: table RAIL.BILL is mutating, trigger/function may not see it
    ORA-06512: at "RAIL.APPROVE_CHECKER", line 4
    ORA-04088: error during execution of trigger 'RAIL.APPROVE_CHECKER'
    Any help appreciated.

    You cannot SELECT from the table on which the row-level trigger is defined, nor can you UPDATE a table on which the row-level trigger is defined. If you are inserting multiple rows in a single INSERT statement, Oracle can't be sure what rows to update and/or select.
    Is there a reason that you wouldn't just create a unique constraint to enforce this condition?
    Justin

  • Count of updated rows after an UPDATE command

    Hi, is there any way to know how many rows have been updated after an UPDATE statement in a PL/SQL program (i know it is possible in Pro*C. Thanks.

    Hi,
    it will be stored in sql%rowcount
    after your update statement try to assign this to a variable
    Update table set ....
    v_count := sql%rowcount;
    check the value of the variable v_count
    Thanks
    Ravi

  • Updating ROW and inserting multiple row

    Hello,
    I needed some help.
    Firstly, i have VO which has 2 EO, these 2 EO are linked with association.
    In my page, i have a table, which by default has one row, and few fields can be edited, on click of "Apply" i want to commit this data,
    but when i use " getOADBTransaction().commit();" it gives me primary key constraint error.
    Secondly, when i click on add row button, it adds new row with unique primary key, also copying few attributes from existing first row.
    So, now when i want to update this table, since this VO is based on 2 EO's which are linked , i can't insert completely since in second EO parent EO's primary key is not inserted.
    Please help.

    I created new VO.
    It is EO based.
    Again, Commit is not working.
    code is
    public void create_row()
    SplitAtsVOImpl svo = getSplitAtsVO1();
    Row row = svo.first();
    Row r = svo.createRow();
    for(int i =1;i<row.getAttributeCount();i++)
    {System.out.println(i+"          "+row.getAttribute(i));
               if(row.getAttribute(i)!=null&&i<27)
             r.setAttribute(i,row.getAttribute(i).toString());
    r.setAttribute("DispAssNum",""+r.getAttribute("AssetNum")+"-"+count);
    r.setAttribute("AtsAssetId",getOADBTransaction().getSequenceValue("ATS_ASSET_TBL_S").toString());
    System.out.println(r.getAttribute("AtsAssetId"));
    r.setNewRowState(Row.STATUS_INITIALIZED);
    //r.setAttribute("AtsAssetId1",(""+row.getAttribute("AtsAssetId")));
    System.out.println(svo.getRowCount());
    svo.insertRowAtRangeIndex(0,r);
    try
    getOADBTransaction().commit();
    catch(OAException e)
    System.out.println(e.toString());
    }

  • How to rollback all rows after inserted by OracleBulkCopy()

    Hello,
    I have tried to roll back external transaction and also tried to abort OracleBulkCopy() but it still inserted all rows. Anyone knows how to do this?
    Case 1: Didn't work. All row inserted anyway.
    OracleConnection connection = new OracleConnection(ConnectionString);
    connection.Open();
    OracleTransaction trans = connection.BeginTransaction();
    OracleBulkCopy bulkCopy = new OracleBulkCoopy(connection, OracleBulkCopyOptions.Default);
    bulkCopy.DestinationTableName = "SomeTable";
    bulkCopy.WriteToServer(SomeDataTable);
    trans.Rollback();
    Case 2: Use OracleRowsCopiedEventHandler delegate and in this callback set Oracle.RowsCopiedEventsArgs.Abort to true and then rollback on the transaction in catch block. Didn't work either.
    Thank you.
    Hoang

    OK, I have gotten the answer from Oracle. Transaction is not supported with OracleBulkCopy() currently.

  • In software update even after notifying that it has been partially downloaded to some % it starts from the beginning again? How can i  solve this???

    PLEASE ANSWER THIS.

    probably "leave message on server" setting
    Check your accounts server settings.
    Also if you have leave ..... enabled you must mark "until I delete them"

  • AFTER INSERT OR UPDATE TRIGGER the insert not working

    The update works but the insert is not working. I have two version that I have tried. I amd executing the inserts/update from Oracle Applications and the table row is either being inserted or updated correctly.
    DROP TRIGGER APPS.CCC_HZ_ORG_CONTACTS_ARU;
    CREATE OR REPLACE TRIGGER APPS.CCC_HZ_ORG_CONTACTS_ARU
    /* --Created By: SKELLEHER
    --Creation Date: 07/15/09
    --Last Updated By:
    --Last Update Date:  
    AFTER INSERT OR UPDATE OF department, job_title
    ON apps.hz_org_contacts
    FOR EACH ROW
    WHEN (
    NEW.department <> OLD.department OR
    NEW.job_title <> OLD.job_title
    DECLARE
    v_ChangeType VARCHAR2(10);
    BEGIN
    /* Use 'I' for Insert, 'U'' for Update, and'D' for delete(not part of app at this time). */
    IF INSERTING THEN
    v_ChangeType := 'INSERT';
    ELSIF UPDATING THEN
    v_ChangeType := 'UPDATE';
    ELSE
    v_ChangeType := 'DELETE';
    END IF;
    INSERT INTO cust.ccc_tca_po_tf_event_tbl
    VALUES (ccc_tca_po_tf_event_tbl_s.NEXTVAL
    , 'hz_org_contacts'
    , v_ChangeType
    , 'org_contact_id'
    , :NEW.org_contact_id
    , 'PENDING'
    , NULL
    , 0
    , 'N'
    , 'Y'
    , :NEW.LAST_UPDATED_BY
    , :NEW.LAST_UPDATE_DATE
    , -1
    , SYSDATE
    , 'DEPARTMENT_JOBTITLE_UPDATE'
    ,'LDAP'
    END;
    AND I TRIED ANOTHER VERSION:

    I have simplified it so it's just checking for insert but it's not picking up. Is the syntax IF INSERTING correct?
    CREATE OR REPLACE TRIGGER APPS.CCC_HZ_ORG_CONTACTS_ARU
    AFTER INSERT OR UPDATE
    ON ar.hz_org_contacts
    FOR EACH ROW
    DECLARE
    BEGIN
    IF INSERTING THEN
    INSERT INTO cust.ccc_tca_po_tf_event_tbl
    VALUES (ccc_tca_po_tf_event_tbl_s.NEXTVAL
    , 'hz_org_contacts'
    , 'UPDATE'
    , 'org_contact_id'
    , :NEW.org_contact_id
    , 'PENDING'
    , NULL
    , 0
    , 'N'
    , 'Y'
    , :NEW.LAST_UPDATED_BY
    , :NEW.LAST_UPDATE_DATE
    , -1
    , SYSDATE
    , 'DEPARTMENT_JOBTITLE_UPDATE'
    ,'LDAP'
    END IF;
    END;
    /

  • After update row level trigger help

    Hello,
    I have to update some data on a table. I need to be able to undo the update just in case something goes wrong after update is comitted. I decided to keep track of updated rows by inserting new and old values on a audit table using UPDATE ROW LEVEL trigger. Everything working fine as I wished, but here is what I am having a problem in separating each bulk of update by a unique ID... I am not talking about any primary key or autogenerated sequence key here.
    Audit table inserts values: primary key of table, old value before update, new value after update, and time stamp. Now, I want add one more field on the audit table that indentifies each bulk of UPDATE operation... I tried to use session ID, it works fine, but sometimes I may update two or three times, maybe around same time, on the same day from the same session (timestamp doesn't help me). In that case, each UPDATE operation inserts the same session ID on Audit table. I won't know which update operation populated which row of the audit table.
    Can somebody give me how I can resolve this situation. Again, this has to be inside the trigger. Is there any other IDs that I can use? I would appreciate your help. Thanks,

    Can you add a table level trigger in addition to your row level trigger? If so, you could do what you want in there. In the new trigger, formulate a unique value (such as session id || sysdate) and store it using dbms_application_info.set_module and set the MODULE to that value. Then, in your row level trigger code, execute dbms_application_info.read_module and pull the MODULE value and insert it into your audit table.
    The use of session id || sysdate should be fine (and unique) in this context. You'd just have to know at what time the UPDATE batch occurred that you wanted to undo.
    By the way, you could use LogMiner to do what I think you're trying to create with the use of your trigger code and table entries. Recall the Oracle keeps the undo and redo data for every row that is updated in the redo/archive logs. Using LogMiner, you could find and undo any change from any time. Just like your method, you'd have to know when the "bad" thing occurred in order to find the correct log and "mine" it, but all the functionality is there. There's a kinda old, but very good, article by Arup Nanda at http://www.oracle.com/technology/oramag/oracle/05-jul/o45dba.html that reviews how it all works. You may want to look at it to see if you can avoid re-inventing the wheel to meet your needs. Just a thought....
    Karen

  • How do I update/insert into a target table, rows after date X

    Hi all
    I have a mapping from source table A to target table B. Identical table structure.
    Target table A updates rows and inserts rows daily. Every week I want to synchronize this with table B.
    I have CREATION_DATE and LAST_UPDATE_DATE on both tables. I want to pass in a parameter to this mapping of date X which tells the mapping:
    "if CREATION_DATE is past X then do an insert of this row in B, if LAST_UPDATE_DATE is past X then do an update of this row in B"
    Please can you help me work out how to map this correctly as I am new to OWB.
    Many thanks
    Adi

    Hi,
    You can achieve this by -
    1. Create a control table, say Control_Table, with structure
    Map Name, last_load_date. Populate this table with the mappings that synchronizes your Table B.
    2. Alter mapping, that loads Table B to use the above control table to get all the records from Table A, you have to join Table A and Control_Table with the condition -
    Control_Table.Map_Name = < mapping name>
    AND ( TableA.Creation_Date > Control_Table.last_load_date
    OR TableA.Last_Update_Date > Control_Table.last_load_date )
    3. Then use UPDATE/INSERT on the Table B based on the Keys. This should take care of INSERT ( if not present) / UPDATE (if the row already exists).
    4. Schedule the mapping to run on weekly basis.
    5. You have to maintain the Control_Table to keep changing the values for Last_Load_Date to pick the data since the last time Table B is synchronized.
    HTH
    Mahesh

  • How to check if row to be inserted will cause circular circular loop?

    Hi-
    I'm using connect by clause to do some processing and to check that the data is not causing circular loops (with SQLCODE = -1436).
    Customers can add data via API, and this data, after inserted, can cause the problem explained above (loop). Therefore I need to find a way to check that these new values don't collide with the existing data in the table.
    One way that currently works is to insert the data, use my pl/sql function to check that there's no loops; if there's a loop, i catch the exception, delete the rows I just inserted, and throw back the error to the user.
    I find it very ugly and unneficient, but I can't find the way to use CONNECT BY with data that is not present in the table. example:
    table my_table contains
    parent_id | child_id
    111 | 777
    777 | 333
    and now customer wants to insert:
    parent_id | child_id
    777 | 111
    Also, if customer wants to insert
    333 | 111
    if I insert the row and run my script, it will work OK, but only if I insert the row. Is there any way to validate this without inserting/removing the row ?
    the script I'm using is similar to the one posted here:
    problems using CONNECT BY
    thanks

    This approach may fail to detect loops introduced by concurrent transactions if one of the transaction uses a serializable isolation level.
    For example, assume there are two sessions (A and B), the table and trigger have been created, and the table is empty. Consider the following scenario.
    First, session A starts a transaction with serializable isolation level:
    A> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
    Transaction set.Next, session B inserts a row and commits:
    B> INSERT INTO my_table (parent_id, child_id) VALUES (111, 777);
    1 row created.
    B> COMMIT;
    Commit complete.Now, session A successfully inserts a conflicting row and commits:
    A> INSERT INTO my_table (parent_id, child_id) VALUES (777, 111);
    1 row created.
    A> COMMIT;
    Commit complete.
    A> SELECT * FROM MY_TABLE;
    PARENT_ID  CHILD_ID
          111       777
          777       111Session A "sees" the table "as of" a point in time before session B inserted. Also, once session B commits, the lock it acquired is released.
    An alternative approach that would prevent this could use SELECT...FOR UPDATE and a "table of locks" like this:
    SQL> DROP TABLE MY_TABLE;
    Table dropped.
    SQL> CREATE TABLE MY_TABLE
      2  (
      3      PARENT_ID NUMBER,
      4      CHILD_ID NUMBER
      5  );
    Table created.
    SQL> CREATE TABLE LOCKS
      2  (
      3      LOCK_ID INTEGER PRIMARY KEY
      4  );
    Table created.
    SQL> INSERT INTO LOCKS(LOCK_ID) VALUES(123);
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> CREATE OR REPLACE TRIGGER MY_TABLE_AI
      2      AFTER INSERT ON my_table
      3  DECLARE
      4      v_count NUMBER;
      5      v_lock_id INTEGER;
      6  BEGIN
      7      SELECT
      8          LOCK_ID
      9      INTO
    10          v_lock_id
    11      FROM
    12          LOCKS
    13      WHERE
    14          LOCKS.LOCK_ID = 123
    15      FOR UPDATE;
    16         
    17      SELECT
    18          COUNT (*)
    19      INTO  
    20          v_count
    21      FROM  
    22          MY_TABLE
    23      CONNECT BY
    24          PRIOR PARENT_ID = CHILD_ID;
    25 
    26  END MY_TABLE_AI;
    27  /
    Trigger created.Now the scenario plays out like this.
    First, session A starts a transaction with serializable isolation level:
    A> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
    Transaction set.Next, session B inserts a row and commits:
    B> INSERT INTO my_table (parent_id, child_id) VALUES (111, 777);
    1 row created.
    B> COMMIT;
    Commit complete.Now, when session A tries to insert a conflicting row:
    A> INSERT INTO my_table (parent_id, child_id) VALUES (777, 111);
    INSERT INTO my_table (parent_id, child_id) VALUES (777, 111)
    ERROR at line 1:
    ORA-08177: can't serialize access for this transaction
    ORA-06512: at "TEST.MY_TABLE_AI", line 5
    ORA-04088: error during execution of trigger 'TEST.MY_TABLE_AI'To show that this still handles other cases:
    1. Conflicting inserts in the same transaction:
    SQL> TRUNCATE TABLE MY_TABLE;
    Table truncated.
    SQL> INSERT INTO my_table (parent_id, child_id) VALUES (111, 777);
    1 row created.
    SQL> INSERT INTO my_table (parent_id, child_id) VALUES (777, 111);
    INSERT INTO my_table (parent_id, child_id) VALUES (777, 111)
    ERROR at line 1:
    ORA-01436: CONNECT BY loop in user data
    ORA-06512: at "TEST.MY_TABLE_AI", line 15
    ORA-04088: error during execution of trigger 'TEST.MY_TABLE_AI'2. Read-committed inserts that conflict with previously committed transactions:
    SQL> TRUNCATE TABLE MY_TABLE;
    Table truncated.
    SQL> INSERT INTO my_table (parent_id, child_id) VALUES (111, 777);
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> INSERT INTO my_table (parent_id, child_id) VALUES (777, 111);
    INSERT INTO my_table (parent_id, child_id) VALUES (777, 111)
    ERROR at line 1:
    ORA-01436: CONNECT BY loop in user data
    ORA-06512: at "TEST.MY_TABLE_AI", line 15
    ORA-04088: error during execution of trigger 'TEST.MY_TABLE_AI'3. Conflicting inserts in concurrent, read-committed transactions:
    a) First, empty out the table and start a read-committed transaction in one session (A):
    A> TRUNCATE TABLE MY_TABLE;
    Table truncated.
    A> SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
    Transaction set.b) Now, start a read-committed transaction in another session (B) and insert a row:
    B> SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
    Transaction set.
    B> INSERT INTO my_table (parent_id, child_id) VALUES (111, 777);
    1 row created.c) Now, try to insert a conflicting row in session A:
    A> INSERT INTO my_table (parent_id, child_id) VALUES (777, 111);This is blocked until session B commits, and when it does:
    B> COMMIT;
    Commit complete.the insert in session A fails:
    INSERT INTO my_table (parent_id, child_id) VALUES (777, 111)
    ERROR at line 1:
    ORA-01436: CONNECT BY loop in user data
    ORA-06512: at "TEST.MY_TABLE_AI", line 15
    ORA-04088: error during execution of trigger 'TEST.MY_TABLE_AI'If updates are permitted on the table, then they could cause loops also, but the trigger could be modified to test for this.

  • After insert trigger problem

    I am trying to write a trigger which will update a date col after every insert////
    CREATE OR REPLACE TRIGGER PS1.XX_CDATE
    AFTER INSERT ON ps1.COMMNPLANBUDGET
    REFERENCING OLD AS old NEW AS new
    FOR EACH ROW
    declare PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    update ps1.COMMNPLANBUDGET set CREATION_DATE=sysdate where PROJECTID = :new.PROJECTID;
    commit;
    END XX_CDATE;
    For the same i have written the above code, it created successfully but when i am inserting a record the date col is not getting updated. Please let me know where i have done wrong. Thanks in advance

    Hello
    You should not use autonomous transactions in a trigger. Do not do it, and if anyone tells you to use autonomous transactions in a trigger to avoid mutating table exceptiosn, you should instruct them to put their hands in a toaster, switch it on maximum and insist they keep them there until the timer reaches zero.
    Anyway, if the primary key on this table is project ID, you don't need to go to these lengths. You can simply
    CREATE OR REPLACE TRIGGER PS1.XX_CDATE
    BEFORE INSERT ON ps1.COMMNPLANBUDGET
    REFERENCING OLD AS old NEW AS new
    FOR EACH ROW
    BEGIN
        :NEW.creation_date := sysdate;
    END XX_CDATE;If project_id is not the primary key, why would you update the creation date for all rows attached to the project id?
    David
    Edited by: Bravid on Sep 22, 2011 9:29 AM
    Oops, after reading Karthik's post, I realised I left the AFTER insert in the trigger spec. Updated it to BEFORE.

  • Count of updated rows

    Hi there,
    I would like to be able to count updated rows after submitting a page. I'm aware that #MRU_COUNT# does that in success messages, but I don't know how to (or is it even possible) assign that value to a page item, for instance.
    (The number of updated rows isn't all that important, I would just like to know if there was a change made or not).
    Any help is much appreciated!
    Edited by: 893204 on Oct 25, 2011 2:40 PM

    Hi, Chris, thank you for your reply.
    I have a report on Employees (Automated Row Fetch).
    Editing a row brings up a modal window where I can change employee name, address and so on. I want to be able to know was there any change made to the row when the user clicks Submit.
    I hope I made things clearer this time.

  • Acrobat X Pro makes text disappear from a page when I insert that page into another PDF

    I printed a single page Microsoft Project schedule to PDF using Acrobat X Pro.  All good.  I then inserted that one page into another PDF document using Tools/Insert Pages/Insert from File.  Much of the text in the inserted page goes missing after inserting that page into the other PDF document.  How do I prevent this disappearing text problem?

    Does the inserted page have a lot of markup? I do not think the markup will insert.

Maybe you are looking for

  • EPMMaster.rpd Fusion Pack migration from OBIEE 10g to 11g

    We have successfully installed OBIEE 10g and 11g on Windows 2008 32bit servers. On the 10g Installation, we have applied the Fusion Pack EPMMaster RPD file and it connects successfully to our EPM warehouse. We want to migrate the Fusion pack to 11g w

  • [SOLVED] xorg 1.5 + keyboard key

    Certain of the keyboard keys do not work after the upgrade to xorg 1.5  These include the arrow keys and the page up and page down keys (possibly more but I didn't do a thorough check).  They work fine in the virtual consoles 1-6, however. i'm using

  • Adobe Media Encoder Rendering Issues

    Ok so I am using Adobe Media Encoder version 7.2.2.29. I have been having issues with encoder for awhile now. When I go to queue my videos the encoder doesn't render the file correctly either it be like the example below where a simple imported logo

  • How do I save a video in final cut pro externally?

    I have created a video in final cut pro but cannot seem to export it anywhere. It keeps failing the transfer however I am trying to transfer to large enough storage devices. Any thoughts? Thank you.

  • Making  iMovie copy from corrupted iMove that was sent to Quicktime

    Edited iMovie played in jerks, jumps, skips and freezes, so I exported it to Quicktime. Now it runs smooth in Quicktime Pro, but the images are terrible, like I am seeing mostly pixels. Sound was okay. I want to make a DVD of it for DVD distribution,