Changing HTML encoding in the DB?

D

darrel

I'm migrating a table of web site content into our CMS. Our CMS (custom
built) stores all HTML in the DB as encoded html.

This one particular table, however, has the HTML stores as unencoded HTML.
I'd like to make this table consistent with the rest of the site data in all
the other tables.

The only way I can think of to do this is to write an ASPX page that queries
all records, then loops through them all doing an UPDATE statement. Just
wondering if there's a better/faster/easier way?

-Darrel
 
G

Guest

"encoded" is a sort of ambiguous term. It could mean HtmlEncoded, etc. But if
it's already in the database, there's no way around using an update
statement. Whether you choose to do this with a "single use" ASP.NET page,
console app, or whatever, you are going to have to get out the column data,
re-encode it (whatever that means to you) and update the column with the new
data, unless you want to write a SQL Server 2005 CLR - hosted .NET class to
be used as a stored proc to do it.
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top