Anybody have a clue how to store HTML in an SQL database?
I get errors trying to put the HTML text into a text datatype field....
Please send replies via email.
mark@ntshop.net
Printable View
Anybody have a clue how to store HTML in an SQL database?
I get errors trying to put the HTML text into a text datatype field....
Please send replies via email.
mark@ntshop.net
Mark,
Just store it in the db as HTML--SQL doesn't care what the data is right?
Then, when you want to out put it into your page use the HTMLEncode command:
<%
'From your recordset
myHTML = RS("theHTML")
%>
This is HTML output <%=Server.HTMLEncode(myHTML)%>
Hope this helps...
Tim
------------
mark at 6/26/99 12:39:04 PM
Anybody have a clue how to store HTML in an SQL database?
I get errors trying to put the HTML text into a text datatype field....
Please send replies via email.
mark@ntshop.net
I really don't see why you would do so, but I insert HTML all the time in memo fields for guest books in Access.. Make sure your insert statment use's the replace function if your inserting into the database from ASP.. If someone insert's "Mc'Guinn" for instance, this can mess up your query.. Don't know if that's what you mean, but otherwise the database shouldn't care what type of text you store
------------
Tim Brooks at 10/1/99 9:19:05 AM
Mark,
Just store it in the db as HTML--SQL doesn't care what the data is right?
Then, when you want to out put it into your page use the HTMLEncode command:
<%
'From your recordset
myHTML = RS("theHTML")
%>
This is HTML output <%=Server.HTMLEncode(myHTML)%>
Hope this helps...
Tim
------------
mark at 6/26/99 12:39:04 PM
Anybody have a clue how to store HTML in an SQL database?
I get errors trying to put the HTML text into a text datatype field....
Please send replies via email.
mark@ntshop.net