|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Hi All,
I am using a ASP page(User_Account.asp) to create username and password & updating the info into the database through another ASP page(User_Account_Upload.asp). The problem I am facing is that, at random instances the data gets duplicated. I tried to check if the user Id exixts in the database before updating. After implementing this logic, whenever I create a new user, if the ASP page tries to store the username for the 2nd time, it generates an error message that the user_id exists and doesn't update the database. However, this error message is displayed on the screen even though the user_id was created for the 1st time. I would appreciate any kind of help !! I am also attaching the files with this mail. Thanks in advance! Regards Srinath |
|
#2
|
||||
|
||||
|
You are sure that the double creation happens truly at random, and have not found any pattern?
From a quick look, I haven't found your problem yet, but as a suggestion I would recommend not using "SQL_Query" as the variable for all your queries. Number them or something, so that you don't keep using the same variable with different values all the time. Other than that, I would recommend that you make sure there isn't a pattern or certain circumstances that make the data duplicate. If there are, post that, it could be very helpful. Also, you could try just executing the insert, without setting the variable RS1. Not sure if that will change things, but its a bit simpler. Last edited by karsh44 : July 30th, 2003 at 09:10 AM. |
|
#3
|
|||
|
|||
|
Hi Karsh44,
Thanks for the quick reply. I tried both the options, but to no luck. The data duplication is absolutely random. Sometimes it happens while creating a 2nd user, sometimes the 4th or 5th and sometimes during 8th or 11th. There is absolutely no particular pattern. I am really confused ?? I have a similar code for updating one table with absolutely same logic, & it works like a charm. Any more suggestions you got for me ? Thanks once again !! Regards |
|
#4
|
||||
|
||||
|
Well, I don't really have any more ideas. Could you try to make this into 2 separate actions, since you said you have a similar version for 1 table that works? You could try to make this two 1 table updates instead of 1 two table update.
Good luck |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Data updated into the database twice ?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|