Question

  Asked: Jun 26 2008   8:08 PM GMT
  Asked by: SQL Server Ask the Experts


Storing text documents in tables in SQL Server 2005


SQL Server 2005, Storage, Microsoft Word, Notepad

I have a table in SQL Server 2005 which is used to store text/word documents, and I have enabled full-text search on the column and included a corresponding document type for the document.

The problem is when I upload a real NotePad Text/MS Word document saved from the NotePad/MS Word application. At first, I was able to obtain the record for the document while searching using the 'CONTAINS' clause. But when I create a '.txt' or '.doc' extension file using File I/O and store that file to the table, I am not able to find the record while searching using the 'CONTAINS' clause.

The data type for the document column is varbinary(max) and the document type column is char(5).

I have enabled auto-tracking/indexing of changes to the table.

Is there a default document type to indicate that the document being stored contains only text, and is there an indication that that the full-text search performs indexing for the document?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



Check the full text index properties and see if the document has been added to the index or not. It can take some time for the data to be added to the index. Documents are not added to the index at the same time that they are added to the table.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on SQL Server, Storage and Microsoft Windows.

Looking for relevant SQL Server Whitepapers? Visit the SearchSQLServer.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register