SqlDataReader Problem

J

joelranck

I'm trying to grab some text from my database that is html formatted.
The problem is all the html formatting is lost when I try and get it
from my SqlDataReader.

sqlCmd = new SqlCommand(sqlQuery, sqlConn);
sqlRead = sqlCmd.ExecuteReader();
while (sqlRead.Read()) {
FCKeditor.Value = sqlRead.GetString(0);
}

This obviously isn't the right way to do it.. any ideas?
 
S

Shailen Sukul

Do a Select and see if the data in the db is indeed stored as HTML first.
dr.GetSqlXml shoukd have worked if the data was XML/HTML.


--
With Regards
Shailen Sukul
..Net Architect
(MCPD: Ent Apps, MCSD.Net MCSD MCAD)
Ashlen Consulting Services
http://www.ashlen.net.au
 

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,995
Messages
2,570,228
Members
46,817
Latest member
AdalbertoT

Latest Threads

Top