Hi guys.
I have a Java program that works in 3 stages after connecting to a MySQL database to give desired results.
The first stage involves a function X that returns a value it finds in table A or zero.
The second stage involves a function Y that's only allowed to run if function X returned a numerical value other than zero.It checks table B for a duplicate entry of the returned value.
The 3rd stage involving Z: if there's an existing value in table B equal to the returned value, it returns the string "Duplicate entry.Please enter another value", else it inserts the value in an appropriate column VALUES in table B and calculates a total value, which it then inserts into column RUNNING TOTAL in table B as well.
Now my problem, which I noticed happens on occasions,( say like 2% of all transactions) whose circumstances are unclear is this: that in some cases, it seems that in table B I have duplicate entries of the same value!!Even to the extent that the time stamp associated with each entry is the same to the date and time(example, 2011-01-31 12:20:20 for like 6 entries).Is there something to do with how Java access to MySQL is supposed to be done which I am overlooking, or maybe a MySQL installation or tweaking feature?
98% of transactions work well within the logic of the 3 stages!!
Kindly assist if possible and know that any help will be greatly appreciated!
Thank you all