Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Using ntext

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-29 : 10:32:23
Krishna Mohan writes "I have a column in a table which is of type ntext. I have inserted a word document with formatting like Bold etc. I want to fetch the document and display in the web. When displaying in web the formated values are not displayed. Will the formatting get lost when the document is fetched from the table. Kindly help me."

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-04-29 : 11:14:37
ntext stores character data in unicode format, whereas the formatting codes in Word are stored as binary codes, not character data. In order to maintain these binary codes, you'd have to store them in an image column.

Now, just to drive you insane, if you do that, the unicode data that Word uses to store character data may NOT be preserved; you'd have to find a way to convert them back into unicode. I think that MS Word would handle this automatically, but it might not.

You are FAR FAR FAR better off NOT NOT NOT storing documents or images in a SQL Server database. DON'T DO IT. It is NOT WORTH IT. All it does is cause conversion issues like the one you are experiencing, and it makes storing, retrieving and modifying documents much harder.

Store the document files as disk files, and keep a link to that file in your database.

Go to Top of Page
   

- Advertisement -