Really Strange problem.

Results 1 to 5 of 5

Thread: Really Strange problem.

  1. #1
    Al Bear Guest

    Default Really Strange problem.

    I have a SQL statment which is adding data to a database the only problem is that it is putting the record in twice... here is my code. If anyone know why this might be happing... HELP!<BR><BR>&#039;******************************* **************************<BR>&#039;* SQL input statemnet. <BR>&#039;**************************************** *****************<BR><BR>SQL = "INSERT INTO document"<BR>SQL = SQL & " (title, added, http_text, personID, modified) "<BR>SQL = SQL & " VALUES(&#039;" & str_title & "&#039;,&#039;" & var_date & "&#039;,&#039;" & str_http & "&#039;,&#039;" & session("personID") & "&#039;,&#039;" & Now() & "&#039;)"<BR><BR>objcon.execute SQL<BR><BR>response.redirect "message.asp"<BR>%&#062;

  2. #2
    Eddie Campbell Guest

    Default RE: Really Strange problem.

    I can&#039;t see anything wrong with what you posted.<BR><BR>Where does this code fit into your page ? Could it be being run twice ? - If you post the page to itself, that could explain why it is happening.<BR><BR>Do the duplicate records have the time of insertion in the modified field ?<BR><BR>What happens on the message.Asp page ?<BR><BR>So many questions, so little code ....

  3. #3
    Al Bear Guest

    Default Explained more..

    the code you see is all of it with the exection of the db connection, which is a file.the message page is just that a message saying well done. The time stamp on the db recod is exactly the same down to the second. <BR><BR>I am so confused by this...

  4. #4
    Eddie Campbell Guest

    Default Hmm.. Database corrupted ?

    If you are using Access, I&#039;d try a repair & compact.<BR><BR>Another thing to try might be to remove the redirect line and try the page again. See if it still adds twice.<BR><BR>Oh and make sure you haven&#039;t got an old version of the page cached.

  5. #5
    Al Bear Guest

    Default RE: Hmm.. Database corrupted ?

    Thaks for the guidance Ed... Fixed the dam thing. <BR><BR>Something to do with the javascript button submitting the page twice. so my ASP was fine. Real *****, I must say.. <BR><BR>Thanks agian for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts