Delete Procedure

Terrence Burke t.e.burke@dundee.ac.uk
Tue, 1 May 2001 13:03:24 +0100


On 30 Apr 2001, at 16:40, GGrimm@pcc-structurals.com wrote:

>      On some situation (yet to be ascertained), a partial update occurs 
>      about 5% of the time when updating cached records if record(s), have 
>      been deleted with a range of numbers, for example: D-9/10.

You are using a single file to provide BOTH the Primary and 
Secondary records for the screen.   You have said nothing about 
the indexes, apart from listing [some of] the segments of two of 
them.
Can you be certain that any of the records selected as Primary by 
the FIND procedure will NOT also be identified as a Secondary 
record for some other Primary record ?
Could any record be selected as Secondary for two or more of the 
Primary records ?
In either case, you will inevitably have update errors on occasions.

Do you ever have any errors if the Primary file occurs just ONCE ?

                      Regards
                         Terry Burke

>      Has anyone an idea what could cause this from the below snippet 
>      without having to see the entire code?  The data base is Oracle 8.06.  
>      Could changing a field in a deleted record after the delete cause a 
>      problem?
>      
>      Following is a snippet of the code, primary and three secondary files, 
>      no DELETE files, secondary retrieval done in FIND procedure with no 
>      records is possible on any of the three secondaries.  The absence of 
>      secondary(s) is not the cause of the partial Update that happens.  
>      
>      ---------
>      FILE TIME_ATTEND  PRIMARY       OCCURS 13       NOITEMS CACHE 255
>         ACCESS VIA EMPLOYEENO, SHIFT_DATE, SHIFT_NO, ENTITY_CODE &
>         USING EMPLOYEENO OF EMPLOYEES, T_SHIFT_DATE,             &
>               T_SHIFT, TIME_ATTEND_ENTITY                        &
>                     ORDERBY EMPLOYEENO, SHIFT_DATE, SEQ_NUM
>         ACCESS VIA SHIFT_DATE, DEPT_CODE, SHIFT_NO, ENTITY_CODE     &
>         USING T_SHIFT_DATE, T_REQ_DEPT, T_SHIFT, TIME_ATTEND_ENTITY &
>                     ORDERBY EMPLOYEENO, SHIFT_DATE, SEQ_NUM
>      FILE TIME_ATTEND_2  SECONDARY  OCCURS WITH TIME_ATTEND  NOITEMS
>      FILE TIME_ATTEND_2  SECONDARY  OCCURS WITH TIME_ATTEND  NOITEMS &
>                                           ALIAS TIME_ATTEND_2IN 
>      FILE TIME_ATTEND    SECONDARY  OCCURS WITH TIME_ATTEND  NOITEMS &
>                                           ALIAS TIME_ATTEND_IN 
>      . . . . .
>      PROCEDURE DELETE
>      BEGIN
>           DELETE TIME_ATTEND_2IN
>           DELETE TIME_ATTEND_IN
>           DELETE TIME_ATTEND_2
>           DELETE TIME_ATTEND
>      END
>       
>      
>      
>      
>      
> 
> 
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l@lists.swau.edu
> Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
> Unsubscribe: "unsubscribe" in message body to powerh-l-request@lists.swau.edu
> http://lists.swau.edu/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.


Dr T E Burke
Admin Information Systems
University of Dundee
Dundee  DD1 4HN
Phone 01382 344022