Always encounter problems with text type and ntext type fields that can't be read.
Today, after a long day, and then looked at the data, and finally the problem was taken care of
First we should know what the difference is between the two types of fields:
Although it looks like they are called text, but he is not used to save the text, is actually used to save the file, and the image type, generally used to save the MIME type of data.
And I used it to keep the main content of the news, so I can save more. The result is always unreadable ...
I use an ADO connection, when reading data, because accustomed to the previous ASP's writing, with Conn.execute () to read,,, this read to save the MIME type of the field is invalid,,,
So change to Rs.Open method to read the good ....
Remember this, to do the study.
So what is the difference between the two methods of execution in nature? What is the difference in dealing with MIME types?
Personally think that the Conn.execute () method to get the MIME type in RS should only get an index, and in the Way of Rs.Open () should be the MIME type of content it!
A comparison of the byte sizes of Rs obtained in both ways should indicate the result.
When applied, use Conn.execute () when listing only indexes, headings, and so on. When you want to display the full content with Rs.Open (), I think this can improve a lot of performance!
Http://www.cnblogs.com/aowind/archive/2006/09/20/509322.html