Click here to Skip to main content
15,910,277 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
hello,
i want to save doc file as rtf into sqlserver database finaly i want to display into textbox or rich text box guide lines or send any snippets
Posted
Updated 19-Feb-12 15:06pm
v2
Comments
[no name] 19-Feb-12 22:46pm    
You have three things here; converting doc to rtf, storing and retrieving file in sql server, displaying the file. Which part are you having difficulty with? What have you tried?
kingsa 19-Feb-12 22:55pm    
converting to rtf and storing
Sergey Alexandrovich Kryukov 20-Feb-12 19:04pm    
Do you understand that with converting to RTF you will have some formatting information lost? So, there is no one universal way of doing so; you will need to map data onto RTF non-injectively.
--SA

1 solution

Use the Microsoft Object Model to save the file as RTF, then read the file into a Stream and then save it out to the DB.

If you want to display it with its formatting you'll need to load it into something that support formatting.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900