netsys
Posts: 39
|
Posted: 06/23/2010, 11:36 AM |
|
I'm trying to do a custom SQL insert of some HTML data into a memo field. I'm saving the data to a variable, and can successfully view the variable data, so I know I'm getting it correctly into the variable. I can write other variable data to my table, but when I try to write anything that contains HTML tags, it doesn't write, as if it's running into a syntax error. I tried copying and pasting the actual HTML into my SQL insert statement, and got an error that it was getting stuck on the first HTML tag with a syntax error.
Here's my statement:
Dim vartextarea2
vartextarea2 = Students.TextArea2.Value
SQL = "INSERT INTO reminders (RegID,ReminderEMailTo,ReminderEMailBody,ReminderEMailSubject) "&_
"VALUES ("& Connection.ToSQL(CCDLookUp("max(RegID)","registrations","", dbsafehunters),ccsInteger) &",'"& Request.Form("Studentemail") &"','"& vartextarea2 &"','"& "Hunters Safety Class Reminder" &"')"
I tried creating a test form that just updates this reminders table, and was able to paste HTML into a memo field and save it to the database without a problem. I'm stumped about how to write my insert statement so that it will write this data. Any help is greatly appreciated.
|
|
|
netsys
Posts: 39
|
Posted: 06/24/2010, 8:41 AM |
|
Nevermind - apparently I was caching the ASP script. After a browser close and reopen, things started working properly!
|
|
|
|