Re: Succesful Status code (was: Request for testing of Reltive File status



On May 20, 2:30 am, docdw...@xxxxxxxxx () wrote:
In article <067d11f8-5e26-40c5-9383-d5272a8f4...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,


I would not have the code that you have written above in my system and
would consider it to be wrong.

Were you to consider it to be incorrect, Mr Plinston, you appear would be
at odds with the manual.

I did not say that the statements or file status were 'incorrect' at
all.

What would be wrong, if that code were in _my_ system (please note the
qualification this time), is that after detecting that a record exists
with a WRITE statement you overwrite that record.

For creating a new record I always READ
the primary key first so that I know whether it is an update (REWRITE)
or an insert (WRITE). If the WRITE then fails on a '22' it is because
some other user has intervened and created the record between my READ
(which was unsuccessful) and the WRITE. Overwriting with the REWRITE
would then be wrong.

When creating a new record on a multi-user system I build the record in
WORKING-STORAGE and then wait for the operator to press the key which
signals a WRITE is to be performed.  I then READ based on the key and make
decisions based on the kind of system, transaction flow and how the users
have specified they want updates of existing records handled... you know,
do what *they* want, not what I Know Is Best For Them.

That may be so in your systems, but not in mine. If a READ had
previously determined whether the record existed then it would be
known whether a WRITE or a REWRITE is required. If either of those
gives an unsucessful file status then there is a problem that needs to
be dealt with, and not by simply overwriting existing data.

I am surprised that you think that overwriting some record is
acceptable, it would destroy data.

I am surprised that your experience seems not to have included updating
widgets-on-hand or seats-available-on-a-flight data, which change
constantly and, thus, are subject to constant destruction-and-re-creation..


I am not sure how you determined what you think is my experience.

I gave an example of how a wrongness may occur, you appear to have
dismissed that situation. Perhaps your experience of multi-user shared
file systems is rather less than mine.


Different situations, Mr Plinston, require different solutions... what
happens, at the machine level, when one encounters a DUPEKEY does (or,
more precisely, should) not.

Which is why my comments were qualified to be my systems. If you had
noticed that then you may have been less tedious in your response.



.



Relevant Pages

  • Re: XP Prof 32 crashed; reinstalled XP, lost all files; need to restor
    ... You were incorrect in that you had no option and you are likely (given what ... Much in the same way a 'wipe' works by overwriting the area of the disk once ... Settings" directory - then you have a very good chance of recovery. ...
    (microsoft.public.windowsxp.general)
  • Re: question about 8 variables
    ... Linux man a écrit: ... The problem is like this I rewrite, my previous post was incorrect ... depending on x_i, y_i and z_i, any of X,Y,Z can be the min. ...
    (sci.math)
  • Re: when i edit a word it overlaps the next.i hav 2 rewrite everythin
    ... It toggles between inserting and overwriting. ... Microsoft MVP. ... word and i have to rewrite the whole sentence. ...
    (microsoft.public.word.docmanagement)
  • Re: Indexof problem, or what?
    ... Are you absolutely certain one of the caracters in one of the strings ... weren't incorrect? ... If so, if you rewrite the code, do you get the same ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Over 100 bug fixes coming!!!
    ... In article, Edwin ... You've claimed that Vista was a complete rewrite ... Incorrect, you mean. ...
    (comp.sys.mac.advocacy)