I'm trying to troubleshoot some code and I'm fairly new to this so I don't really know what to look for. I have a program that collects info from a user, inserts that info into a db table as a new record and then immediately sends an email to the user saying their info has been received.
I've noticed that sometimes when I have two users that are trying to use the system at approximately the same time, the first user ends up not getting an email (the second step in this process) and the second user's info is not written to the appropriate table (the first step in this process) and consequently they are also not receiving an email.
I assume there is a conflict between the email trying to go out and the info from the second person trying to be inserted into the database. What can I do to my code that will allow one user to get all the way through the process before the other user's info gets written to the database without generating an error that is seen by either user?
Can anyone point me in the right direction? I would greatly appreciate it!
thanks!
I've noticed that sometimes when I have two users that are trying to use the system at approximately the same time, the first user ends up not getting an email (the second step in this process) and the second user's info is not written to the appropriate table (the first step in this process) and consequently they are also not receiving an email.
I assume there is a conflict between the email trying to go out and the info from the second person trying to be inserted into the database. What can I do to my code that will allow one user to get all the way through the process before the other user's info gets written to the database without generating an error that is seen by either user?
Can anyone point me in the right direction? I would greatly appreciate it!
thanks!