AndrewMozley
Programmer
I have a very long running Clipper 5.3 application, and am finding that a sequence of instructions to APPEND a record and populate its fields is sometimes failing.
This application is running on a network of two users.
The sequence of instructions which I am using is :
SELECT mytable
APPEND BLANK
REPLACE Field1 WITH Val1
REPLACE Field2 WITH Val2
. . .
(I realize that I could combine the REPLACE commands)
Usually this works fine, but on about one record in 4,000 over the past two years, although a record is being APPENDed, it is not being populated: there is a blank record in the table. (over the preceding four years, at least, there had not been a problem)
I know that I could (perhaps should) issue a NetErr() call to see whether the APPEND has worked; but that does not seem to be the problem; the record is indeed being appended - it is just not being populated.
Should I perhaps enclose the REPLACE sequence with an IF RLOCK() . . . UNLOCK bracket? The rest of a fairly substantial system has worked happily for over 10 years, and although it may be lazy, I had not thought that there was any danger of multi-user interference between APPEND and REPLACE.
Alternatively, is there a way that I can test whether the REPLACE commands have worked? It might be difficult for me as developer, to check this out, because the code always works for me when I test it! No doubt that is what users are for!
Thanks. Andrew
This application is running on a network of two users.
The sequence of instructions which I am using is :
SELECT mytable
APPEND BLANK
REPLACE Field1 WITH Val1
REPLACE Field2 WITH Val2
. . .
(I realize that I could combine the REPLACE commands)
Usually this works fine, but on about one record in 4,000 over the past two years, although a record is being APPENDed, it is not being populated: there is a blank record in the table. (over the preceding four years, at least, there had not been a problem)
I know that I could (perhaps should) issue a NetErr() call to see whether the APPEND has worked; but that does not seem to be the problem; the record is indeed being appended - it is just not being populated.
Should I perhaps enclose the REPLACE sequence with an IF RLOCK() . . . UNLOCK bracket? The rest of a fairly substantial system has worked happily for over 10 years, and although it may be lazy, I had not thought that there was any danger of multi-user interference between APPEND and REPLACE.
Alternatively, is there a way that I can test whether the REPLACE commands have worked? It might be difficult for me as developer, to check this out, because the code always works for me when I test it! No doubt that is what users are for!
Thanks. Andrew