I'm trying to replace all apostaphes and I can't get this to work. Here is my script. In what format do I need this in to be able to work? Right now putting the variable addtrain in there doesn't go in my database at all. Please assist
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "DSN=abcds;UID=username;PWD=password;DATABASE=datadata"
Dim WONUM, TECH, ADDTRAIN, SATISEXP, COMMENTS
WONUM=Request.Querystring("WONUM")
TECH=Request.Querystring("TECH")
TODAY=Date()
IPADD=Request.ServerVariables("REMOTE_ADDR")
if not isempty(Request.Form("Add")) then
ADDTRAIN=Replace(TrainingExplain, "'", "''")
conn.Execute "insert into MISSurvey (WO_NUM, ResponseTime, Satisfaction, Satisfactionexplain, AdditionalTraining, " _
& " TrainingExplain, Notified, Overallexperience, Comments) values (', " _
& "'" & Request.Form("WO_NUM") & "', " _
& "'" & Request.Form("ResponseTime") & "', " _
& "'" & Request.Form("Satisfaction") & "', " _
& "'" & Request.Form("SatisfactionExplain") & "', " _
& "'" & Request.Form("AdditionalTraining") & "', " _
& "'" & ADDTRAIN & "', " _
& "'" & Request.Form("Notified") & "', " _
& "'" & Request.Form("Overallexperience") & "', " _
& "'" & Request.Form("Comments") & "')"
response.redirect "survey.asp"
end if
%>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "DSN=abcds;UID=username;PWD=password;DATABASE=datadata"
Dim WONUM, TECH, ADDTRAIN, SATISEXP, COMMENTS
WONUM=Request.Querystring("WONUM")
TECH=Request.Querystring("TECH")
TODAY=Date()
IPADD=Request.ServerVariables("REMOTE_ADDR")
if not isempty(Request.Form("Add")) then
ADDTRAIN=Replace(TrainingExplain, "'", "''")
conn.Execute "insert into MISSurvey (WO_NUM, ResponseTime, Satisfaction, Satisfactionexplain, AdditionalTraining, " _
& " TrainingExplain, Notified, Overallexperience, Comments) values (', " _
& "'" & Request.Form("WO_NUM") & "', " _
& "'" & Request.Form("ResponseTime") & "', " _
& "'" & Request.Form("Satisfaction") & "', " _
& "'" & Request.Form("SatisfactionExplain") & "', " _
& "'" & Request.Form("AdditionalTraining") & "', " _
& "'" & ADDTRAIN & "', " _
& "'" & Request.Form("Notified") & "', " _
& "'" & Request.Form("Overallexperience") & "', " _
& "'" & Request.Form("Comments") & "')"
response.redirect "survey.asp"
end if
%>