0

I have one variable email_body in my database and it is defined as text datatype. When I check the values which are stored in email_body, it is in the form of html.

Can anybody tell me how it is storing in html format?

for e.g.

<p class="MsoNormal" style="margin: 0in 0in 0pt;">
  <span style="color: black; font-family:&quot;tim&quot;,&quot;serif&quot;;">
    <span style="font-size:small;">Hi,</span>
  </span>
</p> 
<p class="MsoNormal" style="margin: 0in 0in 0pt;">
  <span style="color: black;font-family:&quot;tim&quot;,&quot;serif&quot;;">
    <br />
    <span style="font-size: small;">Here is the weekly check register for the week of MM-DD-YY</span>
  </span>
</p> 
<p class="MsoNormal" style="margin: 0in 0in 0pt;">
  <span style="color: black;font-family:&quot;tim&quot;,&quot;serif&quot;;">
    <span style="font-size:small;">&nbsp;</span>
  </span>
</p> 
<p class="MsoNormal" style="margin: 0in 0in 0pt;">
   <span style="color: black;font-family:&quot;tim&quot;,&quot;serif&quot;;">
      <span style="font-size: small;">If you have any questions, please feel free to contact us.</span>
   </span>
</p> 
<p class="MsoNormal" style="margin: 0in 0in 0pt;">
  <span style="color: black;font-family:&quot;tim&quot;,&quot;serif&quot;;">
     <span style="font-size:small;">&nbsp;</span>
  </span>
</p> 
<p class="MsoNormal" style="margin: 0in 0in 0pt;">
  <span style="color: black;font-family:&quot;tim&quot;,&quot;serif&quot;;">
     <span style="font-size: small;">Please <strong><span style="text-decoration:underline;">
        <span style="font-family: &quot;tim&quot;,&quot;serif&quot;;">reply to all</span>
     </span></strong> when responding to this email.</span>
  </span>
</p>
2
  • Which database do you use? I don't think TEXT is standard SQL type. Also HTML is a text after all. Commented May 5, 2011 at 7:35
  • If you post code, XML or data samples, please highlight those lines in the text editor and click on the "code samples" button ( { } ) on the editor toolbar to nicely format and syntax highlight it! Commented May 5, 2011 at 8:13

2 Answers 2

1

From MSDN

note that the Text Datatype has become obsolete and has been superseded by the VARCHAR(MAX) datatype.

text

Variable-length non-Unicode data in the code page of the server and with a maximum length of 231-1 (2,147,483,647) characters. When the server code page uses double-byte characters, the storage is still 2,147,483,647 bytes. Depending on the character string, the storage size may be less than 2,147,483,647 bytes.

Sign up to request clarification or add additional context in comments.

Comments

0

what is your problem exactly ? do you store them in html-format or cant ? even html-format is in fact kind of xml format so that you may store it directly as an xml type, too. morely if you want to show that html-formatted data in your browser you may use a label. Assing html as a string to label.text property.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.