Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Coding, syntax & commands
You could try a seek on the main table to see if the new value is already in place. Yours is the first time I've heard of this strange occurance. Without knowing the cause, it seems like overkill to add this maximum test. Besides, since you only had one instance, you don't have any proof that the maximum test cured the problem.
>How can a record exist in the table that has a higher value than the id table value?
>Do you have other processes that are adding records without the id table?
>
>My application is designed for multiuser environment.
>
>It happened to one of our clients. I don't know how it happened exactly. One of the users noticed that some related information about a record wasn't correct, so they called us. I had to take their data, check and fix it. That's when I noticed the duplicate entry there. So I added a check for maximum value. According to my code, it shouldn't. I lock the record in the id table retrieve increment it and save it to a variable then unlock it. A record with a higher value in the table could exist, if somehow the saving to the id table was not successful while the record in the table was created successfully. Next time, the id is repeated. But I must say since that maximum checking was added, I haven't had one instance. Of course, that doesn't mean it won't happen.
>
>Dawa
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only