How do I read a Word document into a SQL database, search it via fulltext, and then display it via ASP?
You have two options:
* Save the word document as a binary object in the database (this article may help: http://weblogs.asp.net/cazzu/archive/2003/08/27/25568.aspx)
* Save the document as XML. At this point, in SQL Server 2000 you can only store this as a large text field and have it indexed. SQL Server has no knowledge of tags and the like, so they will get indexed too. This is not cool. In SQL Server 2005 you'll be able to store the XML as a new native type, and it can be fully indexed/optimized taking into account the structure and particularities of XML.
For displaying it later, you just have to send the file to the user using the same technique explained in the referenced article. If you send the XML generated directly from Word 2003, you don't even need to set the content type, as IE will know that it's something that needs to be opened with Word.
Dig Deeper on Win Development Resources
Related Q&A from Daniel Cazzulino
Here Daniel Cazzulino explains how to load a DSL (domain specific language) domain model instance file programmatically. This requires the .NET type ... Continue Reading
Here we offer a glimpse at 12 of .NET development expert Danny Cazzulino's top ASP.NET questions and answers. Continue Reading
C# developers should NOT be modifying InitializeComponent method in the code-behind (or any of the variable definitions) by hand. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.