CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 custom SQL insert of HTML content from a memo field

Print topic Send  topic

Author Message
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.
View profile  Send private message
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!
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.