I'm working on a project and need help.
I am trying to add information to a database which is simple enough. But I am also checking the DB to make sure that the info isn't already in the DB. the code seem to work for the first time, but after i have added 1 record, it thinks everything else is a duplicate.
here is some of the code
Code:
Conn.CommandText = "Select Distinct Item1 from table1 Where Id = '" & Id "'"
set Duplicates = Conn.Execute
IF not Duplicates.EOF then
Sub Debug(Msg)
Msg = Replace(Msg,"'","\'")
Response.Write "<script language='JavaScript'>"
Response.Write "alert('"&Msg&"');"
Response.Write "history.back();"
Response.Write "</script>"
Response.End
End Sub
If Request("Duplicates") = "" Then Msg = "Duplicates Not Allowed" : Debug Msg
END IF
I am truely an ASP newb. I am learning as i go, so please don't brow beat me too bad for my code.
