I have a simple ASP page that should delete or insert a row based on passed-in variables. I have similar files that work fine, but this one does not work... even though there are no errors and the response.write checks work fine. I even tried using literal values with no luck. Any ideas? Here is the code:
<%
dim tid
dim email
dim joinOrUnjoin
tid = UCase(Request.Form("thisID"))
email = UCase(Request.Form("email"))
joinOrUnjoin = UCase(Request.Form("joinOrUnjoin"))
dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=SQLOLEDB;Server=*********;Database=Reports;User Id=**********;Password=***********;"
objConn.mode = 3
objConn.Open
if LCase(joinOrUnjoin) = "join" then
strSQL = "INSERT INTO SSOcomEmailDistribution (ID, Email) VALUES ('" & id & "', '" & email & "')"
Response.write "Join"
else
strSQL = "DELETE From SSOcomEmailDistribution WHERE ID='" & id & "' AND Email='" & email & "'"
Response.write "Unjoin " & id & " " & email
end if
objConn.Execute(strSQL)
objConn.Close()
Response.write " Done"
%>