Link to home
Start Free TrialLog in
Avatar of Sukeshjph
Sukeshjph

asked on

How can i search for a string value in a sql server varbinary column

I want to have a power search facility in my application.
I am storing doc files in a varbinary(max) column in sql server 2005 database.
Can i compare a string value passed from the front end to the sql server and check whether the doc file stored in the binary format in the database contains the passed string.
Avatar of SteveH_UK
SteveH_UK
Flag of United Kingdom of Great Britain and Northern Ireland image

The doc files cannot be searched directly.  You need to create a full text index on the table.

See http://msdn2.microsoft.com/en-us/library/ms142497.aspx.
Avatar of Sukeshjph
Sukeshjph

ASKER

Can i accomplish my task  any other way...because i don't have permission to do indexing in my database...can i convert the string to byte array and have a search in the varbinary column in the sql server database...
Not for searching within a .DOC file.  The content is encoded.
I enabled the full text search in my  varbinary(max) column now what is the next step to search the passed string in the .doc file stored in this column.
ASKER CERTIFIED SOLUTION
Avatar of SteveH_UK
SteveH_UK
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the points :)