I am getting an error with the syntax of my Insert statement. I tried it with just a couple of fields first (this worked) and then when I added all of the fields I needed, it of course wont work now.
If anyone can see something wrong with my insert into statement please help.
I had wordwrap on when I pasted it.
Any Help appreciated.....
<%
Function Change(strDesc)
'This function replace a single apostrophe with a ^ so the field can be saved to the database.
Change = strDesc
Change = Replace(Change, "'", "^"
End Function
%>
<%
Dim Conn
Dim strSQL
SET Conn = server.createobject("ADODB.Connection"
Conn.Open "MyDataBase"
strSQL = "INSERT INTO Survey(Social Activities, Other Types, Professional Development, Other Types 2, Community Involvement, Charities, In Mind for Future, Remove, Skills and Talents) VALUES ('"+ Change(Request.Form("Social Activities"
) +"', '"+ Change(Request.Form("Other Types"
) +"', '"+ Change(Request.Form("Professional Development"
) +"', '"+ Change(Request.Form("Other Types 2"
) +"', '"+ Change(Request.Form("Community Involvement"
) +"', '"+ Change(Request.Form("Charities"
) +"', '"+ Change(Request.Form("In Mind for Future"
) +"', '"+ Change(Request.Form("Remove"
) +"', '"+ Change(Request.Form("Skills and Talents"
) +"')"
Conn.Execute(strSQL)
If anyone can see something wrong with my insert into statement please help.
I had wordwrap on when I pasted it.
Any Help appreciated.....
<%
Function Change(strDesc)
'This function replace a single apostrophe with a ^ so the field can be saved to the database.
Change = strDesc
Change = Replace(Change, "'", "^"
End Function
%>
<%
Dim Conn
Dim strSQL
SET Conn = server.createobject("ADODB.Connection"
Conn.Open "MyDataBase"
strSQL = "INSERT INTO Survey(Social Activities, Other Types, Professional Development, Other Types 2, Community Involvement, Charities, In Mind for Future, Remove, Skills and Talents) VALUES ('"+ Change(Request.Form("Social Activities"
Conn.Execute(strSQL)